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

Change subject: Render edit summaries on Special:MobileDiff
......................................................................


Render edit summaries on Special:MobileDiff

Like desktop diff does it. Also: Show minor-tag on Special:MobileDiff, too.

Bug: T101797
Change-Id: I5e37933196a977e5ae7f88d77f648121aadbbfbb
---
M includes/specials/SpecialMobileDiff.php
1 file changed, 17 insertions(+), 1 deletion(-)

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



diff --git a/includes/specials/SpecialMobileDiff.php 
b/includes/specials/SpecialMobileDiff.php
index a5ae0e8..59bcf4f 100644
--- a/includes/specials/SpecialMobileDiff.php
+++ b/includes/specials/SpecialMobileDiff.php
@@ -171,6 +171,17 @@
                        $bytesChanged = abs( $bytesChanged );
                }
 
+               if ( $this->rev->isMinor() ) {
+                       $minor = ChangesList::flag( 'minor' );
+               } else {
+                       $minor = '';
+               }
+               if ( $this->rev->getComment() !== '' ) {
+                       $comment = Linker::formatComment( 
$this->rev->getComment(), $title );
+               } else {
+                       $comment = $this->msg( 
'mobile-frontend-changeslist-nocomment' )->escaped();
+               }
+
                $ts = new MWTimestamp( $this->rev->getTimestamp() );
                $this->getOutput()->addHtml(
                        Html::openElement( 'div', array( 'id' => 
'mw-mf-diff-info', 'class' => 'page-summary' ) )
@@ -192,7 +203,12 @@
                                        )
                                )->text()
                        . Html::closeElement( 'div' )
-                       . Html::element( 'div', array( 'id' => 
'mw-mf-diff-comment' ), $this->rev->getComment() )
+                       . $minor
+                       . Html::rawElement(
+                               'div',
+                               array( 'id' => 'mw-mf-diff-comment' ),
+                               $comment
+                       )
                );
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/218022
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5e37933196a977e5ae7f88d77f648121aadbbfbb
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.wel...@t-online.de>
Gerrit-Reviewer: Bmansurov <bmansu...@wikimedia.org>
Gerrit-Reviewer: Florianschmidtwelzow <florian.schmidt.wel...@t-online.de>
Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org>
Gerrit-Reviewer: Kaldari <rkald...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to