Bsitu has uploaded a new change for review.
https://gerrit.wikimedia.org/r/141058
Change subject: Post author is not revision author
......................................................................
Post author is not revision author
Change-Id: Iaedca94682223cc2b7522bf257c1ce761794c09e
---
M handlebars/compiled/flow_block_topic.handlebars.php
M handlebars/compiled/flow_block_topic_edit_post.handlebars.php
M handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
M handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
M handlebars/compiled/flow_block_topiclist.handlebars.php
M handlebars/compiled/flow_post.handlebars.php
M handlebars/flow_post.handlebars
M includes/Formatter/RevisionFormatter.php
8 files changed, 14 insertions(+), 9 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/58/141058/1
diff --git a/handlebars/compiled/flow_block_topic.handlebars.php
b/handlebars/compiled/flow_block_topic.handlebars.php
index 7a8f618..a155c1c 100644
--- a/handlebars/compiled/flow_block_topic.handlebars.php
+++ b/handlebars/compiled/flow_block_topic.handlebars.php
@@ -44,7 +44,7 @@
'.LCRun3::sec($cx, ((is_array($in) && isset($in['roots'])) ?
$in['roots'] : null), $in, true, function($cx, $in) {return '
'.LCRun3::hbch($cx, 'eachPost', Array($cx['scopes'][0],$in), $in,
function($cx, $in) {return '
- <div class="flow-topic flow-load-interactive
'.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['isModerated'])) ?
$in['isModerated'] : null))) ? '' : 'flow-topic-collapsed-invert').'"
id="flow-topic-'.htmlentities(((is_array($in) && isset($in['postId'])) ?
$in['postId'] : null), ENT_QUOTES, 'UTF-8').'"
data-flow-id="'.htmlentities(((is_array($in) && isset($in['postId'])) ?
$in['postId'] : null), ENT_QUOTES, 'UTF-8').'"
data-flow-load-handler="topicElement">
+ <div class="flow-topic flow-load-interactive
'.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['isModerated'])) ?
$in['isModerated'] : null))) ? 'flow-topic-moderated
flow-topic-collapsed-invert' : '').'"
id="flow-topic-'.htmlentities(((is_array($in) && isset($in['postId'])) ?
$in['postId'] : null), ENT_QUOTES, 'UTF-8').'"
data-flow-id="'.htmlentities(((is_array($in) && isset($in['postId'])) ?
$in['postId'] : null), ENT_QUOTES, 'UTF-8').'"
data-flow-load-handler="topicElement">
<div class="flow-topic-titlebar flow-click-interactive"
data-flow-interactive-handler="topicCollapserToggle" tabindex="0">
<h2 class="flow-topic-title"
data-title="'.htmlentities(((is_array($in) && isset($in['content'])) ?
$in['content'] : null), ENT_QUOTES, 'UTF-8').'">'.htmlentities(((is_array($in)
&& isset($in['content'])) ? $in['content'] : null), ENT_QUOTES, 'UTF-8').'</h2>
'.((LCRun3::ifvar($cx, ((is_array($in) &&
isset($in['isModerated'])) ? $in['isModerated'] : null))) ? '
@@ -273,4 +273,4 @@
</div>
';
}
-?>
+?>
\ No newline at end of file
diff --git a/handlebars/compiled/flow_block_topic_edit_post.handlebars.php
b/handlebars/compiled/flow_block_topic_edit_post.handlebars.php
index 06ac77b..1ec35ba 100644
--- a/handlebars/compiled/flow_block_topic_edit_post.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_edit_post.handlebars.php
@@ -71,4 +71,4 @@
</div>
';
}
-?>
+?>
\ No newline at end of file
diff --git a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
index 7fb7a57..d5ce920 100644
--- a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
@@ -43,7 +43,7 @@
'.LCRun3::wi($cx, ((is_array($in) &&
isset($in['revision'])) ? $in['revision'] : null), $in, function($cx, $in)
{return '
<div class="flow-post'.((LCRun3::ifvar($cx, ((is_array($in) &&
isset($in['isModerated'])) ? $in['isModerated'] : null))) ? '
flow-post-moderated' : '').'" data-flow-id="'.htmlentities(((is_array($in) &&
isset($in['postId'])) ? $in['postId'] : null), ENT_QUOTES,
'UTF-8').'"'.((LCRun3::ifvar($cx, ((is_array($in) &&
isset($in['isMaxThreadingDepth'])) ? $in['isMaxThreadingDepth'] : null))) ? '
data-flow-post-max-depth="1"' : '').'>
- '.LCRun3::wi($cx, ((is_array($in) && isset($in['author'])) ?
$in['author'] : null), $in, function($cx, $in) {return '
+ '.LCRun3::wi($cx, ((is_array($in) && isset($in['creator'])) ?
$in['creator'] : null), $in, function($cx, $in) {return '
<span class="flow-author">
<a
href="'.htmlentities(((is_array($in['links']['contribs']) &&
isset($in['links']['contribs']['url'])) ? $in['links']['contribs']['url'] :
null), ENT_QUOTES, 'UTF-8').'"
title="'.htmlentities(((is_array($in['links']['contribs']) &&
isset($in['links']['contribs']['title'])) ? $in['links']['contribs']['title'] :
null), ENT_QUOTES, 'UTF-8').'" class="mw-userlink
flow-ui-tooltip-target">'.htmlentities(((is_array($in) && isset($in['name'])) ?
$in['name'] : null), ENT_QUOTES, 'UTF-8').'</a>
<span class="mw-usertoollinks">(<a
href="'.htmlentities(((is_array($in['links']['talk']) &&
isset($in['links']['talk']['url'])) ? $in['links']['talk']['url'] : null),
ENT_QUOTES, 'UTF-8').'" class="new flow-ui-tooltip-target"
title="'.htmlentities(((is_array($in['links']['talk']) &&
isset($in['links']['talk']['title'])) ? $in['links']['talk']['title'] : null),
ENT_QUOTES, 'UTF-8').'">'.LCRun3::ch($cx, 'l10n', Array('talkpagelinktext'),
'encq').'</a>'.((LCRun3::ifvar($cx, ((is_array($in['links']) &&
isset($in['links']['block'])) ? $in['links']['block'] : null))) ? ' | <a
class="flow-ui-tooltip-target"
href="'.htmlentities(((is_array($in['links']['block']) &&
isset($in['links']['block']['url'])) ? $in['links']['block']['url'] : null),
ENT_QUOTES, 'UTF-8').'" title="'.htmlentities(((is_array($in['links']['block'])
&& isset($in['links']['block']['title'])) ? $in['links']['block']['title'] :
null), ENT_QUOTES, 'UTF-8').'">'.LCRun3::ch($cx, 'l10n', Array('blocklink'),
'encq').'</a>' : '').')</span>
diff --git a/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
b/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
index 42ba015..d5ce920 100644
--- a/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
@@ -43,7 +43,7 @@
'.LCRun3::wi($cx, ((is_array($in) &&
isset($in['revision'])) ? $in['revision'] : null), $in, function($cx, $in)
{return '
<div class="flow-post'.((LCRun3::ifvar($cx, ((is_array($in) &&
isset($in['isModerated'])) ? $in['isModerated'] : null))) ? '
flow-post-moderated' : '').'" data-flow-id="'.htmlentities(((is_array($in) &&
isset($in['postId'])) ? $in['postId'] : null), ENT_QUOTES,
'UTF-8').'"'.((LCRun3::ifvar($cx, ((is_array($in) &&
isset($in['isMaxThreadingDepth'])) ? $in['isMaxThreadingDepth'] : null))) ? '
data-flow-post-max-depth="1"' : '').'>
- '.LCRun3::wi($cx, ((is_array($in) && isset($in['author'])) ?
$in['author'] : null), $in, function($cx, $in) {return '
+ '.LCRun3::wi($cx, ((is_array($in) && isset($in['creator'])) ?
$in['creator'] : null), $in, function($cx, $in) {return '
<span class="flow-author">
<a
href="'.htmlentities(((is_array($in['links']['contribs']) &&
isset($in['links']['contribs']['url'])) ? $in['links']['contribs']['url'] :
null), ENT_QUOTES, 'UTF-8').'"
title="'.htmlentities(((is_array($in['links']['contribs']) &&
isset($in['links']['contribs']['title'])) ? $in['links']['contribs']['title'] :
null), ENT_QUOTES, 'UTF-8').'" class="mw-userlink
flow-ui-tooltip-target">'.htmlentities(((is_array($in) && isset($in['name'])) ?
$in['name'] : null), ENT_QUOTES, 'UTF-8').'</a>
<span class="mw-usertoollinks">(<a
href="'.htmlentities(((is_array($in['links']['talk']) &&
isset($in['links']['talk']['url'])) ? $in['links']['talk']['url'] : null),
ENT_QUOTES, 'UTF-8').'" class="new flow-ui-tooltip-target"
title="'.htmlentities(((is_array($in['links']['talk']) &&
isset($in['links']['talk']['title'])) ? $in['links']['talk']['title'] : null),
ENT_QUOTES, 'UTF-8').'">'.LCRun3::ch($cx, 'l10n', Array('talkpagelinktext'),
'encq').'</a>'.((LCRun3::ifvar($cx, ((is_array($in['links']) &&
isset($in['links']['block'])) ? $in['links']['block'] : null))) ? ' | <a
class="flow-ui-tooltip-target"
href="'.htmlentities(((is_array($in['links']['block']) &&
isset($in['links']['block']['url'])) ? $in['links']['block']['url'] : null),
ENT_QUOTES, 'UTF-8').'" title="'.htmlentities(((is_array($in['links']['block'])
&& isset($in['links']['block']['title'])) ? $in['links']['block']['title'] :
null), ENT_QUOTES, 'UTF-8').'">'.LCRun3::ch($cx, 'l10n', Array('blocklink'),
'encq').'</a>' : '').')</span>
@@ -66,7 +66,7 @@
' : '').'
'.((LCRun3::ifvar($cx,
((is_array($in['actions']) && isset($in['actions']['edit'])) ?
$in['actions']['edit'] : null))) ? '
•
- <a
href="'.htmlentities(((is_array($in['actions']['edit']) &&
isset($in['actions']['edit']['url'])) ? $in['actions']['edit']['url'] : null),
ENT_QUOTES, 'UTF-8').'"
title="'.htmlentities(((is_array($in['actions']['edit']) &&
isset($in['actions']['edit']['title'])) ? $in['actions']['edit']['title'] :
null), ENT_QUOTES, 'UTF-8').'" class="flow-ui-regressive
flow-ui-quiet">'.LCRun3::ch($cx, 'l10n',
Array('flow-post-action-edit-post',((is_array($in) && isset($in['author'])) ?
$in['author'] : null)), 'encq').'</a>
+ <a
href="'.htmlentities(((is_array($in['actions']['edit']) &&
isset($in['actions']['edit']['url'])) ? $in['actions']['edit']['url'] : null),
ENT_QUOTES, 'UTF-8').'"
title="'.htmlentities(((is_array($in['actions']['edit']) &&
isset($in['actions']['edit']['title'])) ? $in['actions']['edit']['title'] :
null), ENT_QUOTES, 'UTF-8').'" class="flow-ui-regressive
flow-ui-quiet">'.LCRun3::ch($cx, 'l10n', Array('flow-post-action-edit-post'),
'encq').'</a>
' : '').'
</span>
'.((LCRun3::ifvar($cx, ((is_array($in) &&
isset($in['previousRevisionId'])) ? $in['previousRevisionId'] : null))) ? '
diff --git a/handlebars/compiled/flow_block_topiclist.handlebars.php
b/handlebars/compiled/flow_block_topiclist.handlebars.php
index 3b0a7db..b775cd2 100644
--- a/handlebars/compiled/flow_block_topiclist.handlebars.php
+++ b/handlebars/compiled/flow_block_topiclist.handlebars.php
@@ -353,4 +353,4 @@
</div>
';
}
-?>
+?>
\ No newline at end of file
diff --git a/handlebars/compiled/flow_post.handlebars.php
b/handlebars/compiled/flow_post.handlebars.php
index 572234e..6f4e670 100644
--- a/handlebars/compiled/flow_post.handlebars.php
+++ b/handlebars/compiled/flow_post.handlebars.php
@@ -20,7 +20,7 @@
);
return ''.LCRun3::wi($cx, ((is_array($in) && isset($in['revision'])) ?
$in['revision'] : null), $in, function($cx, $in) {return '
<div class="flow-post'.((LCRun3::ifvar($cx, ((is_array($in) &&
isset($in['isModerated'])) ? $in['isModerated'] : null))) ? '
flow-post-moderated' : '').'" data-flow-id="'.htmlentities(((is_array($in) &&
isset($in['postId'])) ? $in['postId'] : null), ENT_QUOTES,
'UTF-8').'"'.((LCRun3::ifvar($cx, ((is_array($in) &&
isset($in['isMaxThreadingDepth'])) ? $in['isMaxThreadingDepth'] : null))) ? '
data-flow-post-max-depth="1"' : '').'>
- '.LCRun3::wi($cx, ((is_array($in) && isset($in['author'])) ?
$in['author'] : null), $in, function($cx, $in) {return '
+ '.LCRun3::wi($cx, ((is_array($in) && isset($in['creator'])) ?
$in['creator'] : null), $in, function($cx, $in) {return '
<span class="flow-author">
<a
href="'.htmlentities(((is_array($in['links']['contribs']) &&
isset($in['links']['contribs']['url'])) ? $in['links']['contribs']['url'] :
null), ENT_QUOTES, 'UTF-8').'"
title="'.htmlentities(((is_array($in['links']['contribs']) &&
isset($in['links']['contribs']['title'])) ? $in['links']['contribs']['title'] :
null), ENT_QUOTES, 'UTF-8').'" class="mw-userlink
flow-ui-tooltip-target">'.htmlentities(((is_array($in) && isset($in['name'])) ?
$in['name'] : null), ENT_QUOTES, 'UTF-8').'</a>
<span class="mw-usertoollinks">(<a
href="'.htmlentities(((is_array($in['links']['talk']) &&
isset($in['links']['talk']['url'])) ? $in['links']['talk']['url'] : null),
ENT_QUOTES, 'UTF-8').'" class="new flow-ui-tooltip-target"
title="'.htmlentities(((is_array($in['links']['talk']) &&
isset($in['links']['talk']['title'])) ? $in['links']['talk']['title'] : null),
ENT_QUOTES, 'UTF-8').'">'.LCRun3::ch($cx, 'l10n', Array('talkpagelinktext'),
'encq').'</a>'.((LCRun3::ifvar($cx, ((is_array($in['links']) &&
isset($in['links']['block'])) ? $in['links']['block'] : null))) ? ' | <a
class="flow-ui-tooltip-target"
href="'.htmlentities(((is_array($in['links']['block']) &&
isset($in['links']['block']['url'])) ? $in['links']['block']['url'] : null),
ENT_QUOTES, 'UTF-8').'" title="'.htmlentities(((is_array($in['links']['block'])
&& isset($in['links']['block']['title'])) ? $in['links']['block']['title'] :
null), ENT_QUOTES, 'UTF-8').'">'.LCRun3::ch($cx, 'l10n', Array('blocklink'),
'encq').'</a>' : '').')</span>
diff --git a/handlebars/flow_post.handlebars b/handlebars/flow_post.handlebars
index 1952bbf..eedb814 100644
--- a/handlebars/flow_post.handlebars
+++ b/handlebars/flow_post.handlebars
@@ -1,6 +1,6 @@
{{#with revision}}
<div class="flow-post{{#if isModerated}} flow-post-moderated{{/if}}"
data-flow-id="{{postId}}"{{#if isMaxThreadingDepth}}
data-flow-post-max-depth="1"{{/if}}>
- {{#with author}}
+ {{#with creator}}
<span class="flow-author">
<a href="{{links.contribs.url}}"
title="{{links.contribs.title}}" class="mw-userlink
flow-ui-tooltip-target">{{name}}</a>
<span class="mw-usertoollinks">(<a
href="{{links.talk.url}}" class="new flow-ui-tooltip-target"
title="{{links.talk.title}}">{{l10n "talkpagelinktext"}}</a>{{#if links.block}}
| <a class="flow-ui-tooltip-target" href="{{links.block.url}}"
title="{{links.block.title}}">{{l10n "blocklink"}}</a>{{/if}})</span>
diff --git a/includes/Formatter/RevisionFormatter.php
b/includes/Formatter/RevisionFormatter.php
index 92faf86..2546198 100644
--- a/includes/Formatter/RevisionFormatter.php
+++ b/includes/Formatter/RevisionFormatter.php
@@ -210,6 +210,11 @@
$res['replyToId'] = $replyTo ?
$replyTo->getAlphadecimal() : null;
$res['postId'] =
$row->revision->getPostId()->getAlphadecimal();
$res['isMaxThreadingDepth'] =
$row->revision->getDepth() >= $this->maxThreadingDepth;
+ $res['creator'] = $this->serializeUser(
+ $row->revision->getCreatorWiki(),
+ $row->revision->getCreatorId(),
+ $row->revision->getCreatorIp()
+ );
}
return $res;
--
To view, visit https://gerrit.wikimedia.org/r/141058
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaedca94682223cc2b7522bf257c1ce761794c09e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: frontend-rewrite
Gerrit-Owner: Bsitu <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits