r55289 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55288‎ | r55289 | r55290 >
Date:23:25, 18 August 2009
Author:simetrical
Status:ok
Tags:
Comment:
$wgMaximumMovedPages should only count moved pages

(bug 20289) Previously, some pages that weren't actually moved were
counted against the limit by mistake. Whether it's sane for people to
move pages back and forth by hand to get around the limit is open to
debate, of course.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMovepage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialMovepage.php
@@ -490,6 +490,11 @@
491491 );
492492 $newLink = $skin->linkKnown( $newSubpage );
493493 $extraOutput []= wfMsgHtml( 'movepage-page-moved', $oldLink, $newLink );
 494+ ++$count;
 495+ if( $count >= $wgMaximumMovedPages ) {
 496+ $extraOutput []= wfMsgExt( 'movepage-max-pages', array( 'parsemag', 'escape' ), $wgLang->formatNum( $wgMaximumMovedPages ) );
 497+ break;
 498+ }
494499 } else {
495500 $oldLink = $skin->linkKnown( $oldSubpage );
496501 $newLink = $skin->link( $newSubpage );
@@ -497,11 +502,6 @@
498503 }
499504 }
500505
501 - ++$count;
502 - if( $count >= $wgMaximumMovedPages ) {
503 - $extraOutput []= wfMsgExt( 'movepage-max-pages', array( 'parsemag', 'escape' ), $wgLang->formatNum( $wgMaximumMovedPages ) );
504 - break;
505 - }
506506 }
507507
508508 if( $extraOutput !== array() ) {
Index: trunk/phase3/RELEASE-NOTES
@@ -414,6 +414,7 @@
415415 * Fixed XSS vulnerability for Internet Explorer clients (only pre-release
416416 versions of MediaWiki were affected).
417417 * (bug 14817) Moving a page to a subpage of itself moves it twice
 418+* (bug 20289) $wgMaximumMovedPages should only count pages actually moved
418419
419420 == API changes in 1.16 ==
420421

Status & tagging log