jenkins-bot has submitted this change and it was merged.

Change subject: Post author is not revision author
......................................................................


Post author is not revision author

When editing a post, the original author is replaced with the
editor. This rectifies this issue.

Change-Id: Iaedca94682223cc2b7522bf257c1ce761794c09e
---
M handlebars/compiled/flow_block_topic.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_post.handlebars.php
M handlebars/flow_post.handlebars
M includes/Formatter/RevisionFormatter.php
6 files changed, 14 insertions(+), 9 deletions(-)

Approvals:
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/handlebars/compiled/flow_block_topic.handlebars.php 
b/handlebars/compiled/flow_block_topic.handlebars.php
index f0d8b97..3eea667 100644
--- a/handlebars/compiled/flow_block_topic.handlebars.php
+++ b/handlebars/compiled/flow_block_topic.handlebars.php
@@ -42,9 +42,9 @@
                ').'
        </div>
        <div class="flow-topics">
-               
+
                '.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-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 '.((!LCRun3::ifvar($cx, ((is_array($in) && 
isset($in['isPreview'])) ? $in['isPreview'] : null))) ? '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">
diff --git a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php 
b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
index 3078bb1..6461b38 100644
--- a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
@@ -44,7 +44,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"' : '').'>
                <div class="flow-post-main">
-                       '.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 '
                                '.((!LCRun3::ifvar($cx, ((is_array($in) && 
isset($in['isPreview'])) ? $in['isPreview'] : null))) ? '
                                        <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').'"
diff --git a/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php 
b/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
index 3078bb1..325c011 100644
--- a/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
@@ -29,7 +29,7 @@
        </ul>
 ' : '').'
 
-       
+
        '.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 '
                        <form method="POST" action="'.LCRun3::ch($cx, 
'moderationAction', Array(((is_array($in) && isset($in['actions'])) ? 
$in['actions'] : null),((is_array($cx['scopes'][0]['submitted']) && 
isset($cx['scopes'][0]['submitted']['moderationState'])) ? 
$cx['scopes'][0]['submitted']['moderationState'] : null)), 'encq').'">
@@ -44,7 +44,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"' : '').'>
                <div class="flow-post-main">
-                       '.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 '
                                '.((!LCRun3::ifvar($cx, ((is_array($in) && 
isset($in['isPreview'])) ? $in['isPreview'] : null))) ? '
                                        <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').'"
@@ -75,7 +75,7 @@
                        <div class="flow-post-content">
                                '.LCRun3::ch($cx, 'escapeContent', 
Array(((is_array($in) && isset($in['contentFormat'])) ? $in['contentFormat'] : 
null),((is_array($in) && isset($in['content'])) ? $in['content'] : null)), 
'encq').'
                        </div>
-                       
+
                        '.((!LCRun3::ifvar($cx, ((is_array($in) && 
isset($in['isPreview'])) ? $in['isPreview'] : null))) ? '
                                <div class="flow-post-meta">
                                        <span class="flow-post-meta-actions">
@@ -158,7 +158,7 @@
                        ' : '').'
                </div>
 
-               
+
                '.((!LCRun3::ifvar($cx, ((is_array($in) && 
isset($in['isPreview'])) ? $in['isPreview'] : null))) ? '
                        <div class="flow-replies">
                                '.LCRun3::sec($cx, ((is_array($in) && 
isset($in['replies'])) ? $in['replies'] : null), $in, true, function($cx, $in) 
{return '
diff --git a/handlebars/compiled/flow_post.handlebars.php 
b/handlebars/compiled/flow_post.handlebars.php
index 01ddd6e..114ff0f 100644
--- a/handlebars/compiled/flow_post.handlebars.php
+++ b/handlebars/compiled/flow_post.handlebars.php
@@ -21,7 +21,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"' : '').'>
                <div class="flow-post-main">
-                       '.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 '
                                '.((!LCRun3::ifvar($cx, ((is_array($in) && 
isset($in['isPreview'])) ? $in['isPreview'] : null))) ? '
                                        <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').'"
diff --git a/handlebars/flow_post.handlebars b/handlebars/flow_post.handlebars
index ed7cd31..2f81f30 100644
--- a/handlebars/flow_post.handlebars
+++ b/handlebars/flow_post.handlebars
@@ -1,7 +1,7 @@
 {{#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}}>
                <div class="flow-post-main">
-                       {{#with author}}
+                       {{#with creator}}
                                {{#unless isPreview}}
                                        <span class="flow-author">
                                                <a href="{{links.contribs.url}}"
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: merged
Gerrit-Change-Id: Iaedca94682223cc2b7522bf257c1ce761794c09e
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: frontend-rewrite
Gerrit-Owner: Bsitu <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: SG <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to