r110471 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110470‎ | r110471 | r110472 >
Date:10:15, 1 February 2012
Author:nikerabbit
Status:ok
Tags:miscextensions 
Comment:
Allow syntax like {{Special:MessageGroupStats|group=page-Main/sub|suppresscomplete=1}}
Modified paths:
  • /trunk/extensions/Translate/specials/SpecialLanguageStats.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/specials/SpecialLanguageStats.php
@@ -5,7 +5,7 @@
66 * @file
77 * @author Siebrand Mazeland
88 * @author Niklas Laxström
9 - * @copyright Copyright © 2008-2011 Siebrand Mazeland, Niklas Laxström
 9+ * @copyright Copyright © 2008-2012 Siebrand Mazeland, Niklas Laxström
1010 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1111 */
1212
@@ -113,15 +113,13 @@
114114 $this->noEmpty = (bool)$params[2];
115115 }
116116
117 - // Whether the form has been submitted
118 - $submitted = $request->getVal( 'x' ) === 'D';
 117+ // Whether the form has been submitted, only relevant if not including
 118+ $submitted = !$this->including() && $request->getVal( 'x' ) === 'D';
119119
120120 // Default booleans to false if the form was submitted
121 - if ( !$this->including() ) {
122 - $this->target = $request->getVal( $this->targetValueName, $this->target );
123 - $this->noComplete = $request->getBool( 'suppresscomplete', $this->noComplete && !$submitted );
124 - $this->noEmpty = $request->getBool( 'suppressempty', $this->noEmpty && !$submitted );
125 - }
 121+ $this->target = $request->getVal( $this->targetValueName, $this->target );
 122+ $this->noComplete = $request->getBool( 'suppresscomplete', $this->noComplete && !$submitted );
 123+ $this->noEmpty = $request->getBool( 'suppressempty', $this->noEmpty && !$submitted );
126124
127125 if ( !$this->including() ) {
128126 TranslateUtils::addSpecialHelpLink( $wgOut, 'Help:Extension:Translate/Statistics_and_reporting' );

Follow-up revisions

RevisionCommit summaryAuthorDate
r110738MFT 1.18wmf1 r110309 r110364 r110408 r110471 r110475nikerabbit11:00, 6 February 2012

Status & tagging log