r43103 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43102‎ | r43103 | r43104 >
Date:23:44, 2 November 2008
Author:siebrand
Status:old (Comments)
Tags:
Comment:
(bug 15761) Add user toggle to omit diff after rollback. Patch by FunPika.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialPreferences.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -55,6 +55,7 @@
5656 'tog-diffonly',
5757 'tog-showhiddencats',
5858 'tog-noconvertlink',
 59+ 'tog-norollbackdiff',
5960 ),
6061 'underline' => array(
6162 'underline-always',
Index: trunk/phase3/includes/User.php
@@ -91,6 +91,7 @@
9292 'diffonly',
9393 'showhiddencats',
9494 'noconvertlink',
 95+ 'norollbackdiff',
9596 );
9697
9798 /**
Index: trunk/phase3/includes/Article.php
@@ -2733,7 +2733,7 @@
27342734 $wgOut->addHtml( wfMsgExt( 'rollback-success', array( 'parse', 'replaceafter' ), $old, $new ) );
27352735 $wgOut->returnToMain( false, $this->mTitle );
27362736
2737 - if( !$wgRequest->getBool( 'hidediff', false ) ) {
 2737+ if( !$wgRequest->getBool( 'hidediff', false ) && !$wgUser->getBoolOption( 'norollbackdiff', false ) ) {
27382738 $de = new DifferenceEngine( $this->mTitle, $current->getId(), $newId, false, true );
27392739 $de->showDiff( '', '' );
27402740 }
Index: trunk/phase3/includes/specials/SpecialPreferences.php
@@ -1005,9 +1005,13 @@
10061006 'externaldiff',
10071007 $wgLivePreview ? 'uselivepreview' : false,
10081008 'forceeditsummary',
1009 - ) ) . '</fieldset>'
1010 - );
 1009+ ) ) );
 1010+
 1011+ if( $wgUser->isAllowed( 'rollback' ) )
 1012+ $wgOut->addHtml( $this->getToggle( 'norollbackdiff' ) );
10111013
 1014+ $wgOut->addHtml( '</fieldset>' );
 1015+
10121016 # Recent changes
10131017 $wgOut->addHtml( '<fieldset><legend>' . wfMsgHtml( 'prefs-rc' ) . '</legend>' );
10141018
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -542,6 +542,7 @@
543543 'tog-diffonly' => 'Do not show page content below diffs',
544544 'tog-showhiddencats' => 'Show hidden categories',
545545 'tog-noconvertlink' => 'Disable link title conversion', # only translate this message to other languages if you have to change it
 546+'tog-norollbackdiff' => 'Omit diff after performing a rollback.',
546547
547548 'underline-always' => 'Always',
548549 'underline-never' => 'Never',
Index: trunk/phase3/RELEASE-NOTES
@@ -190,6 +190,7 @@
191191 * Set a special temporary directory for ImageMagick with $wgImageMagickTempDir
192192 * (bug 16113) Show/hide for redirects in Special:NewPages
193193 * (bug 15903) Upload link was added to Nostalgia skin
 194+* (bug 15761) Add user toggle to omit diff after rollback
194195
195196 === Bug fixes in 1.14 ===
196197

Follow-up revisions

RevisionCommit summaryAuthorDate
r43268Update on r43103. Add the 'norollbackdiff' toggle to 'misc', not to 'edit' pe...siebrand22:09, 6 November 2008

Comments

#Comment by Aaron Schulz (talk | contribs)   16:12, 4 November 2008

Should this go under the 'misc' section of prefs?

#Comment by Siebrand (talk | contribs)   21:51, 6 November 2008

I think I agree with this. Option is similar to "Do not show page content below diffs", which is also on misc.

#Comment by Siebrand (talk | contribs)   22:19, 6 November 2008

Done in r43268

Status & tagging log