From: Aryeh Gregor Date: Tue, 18 Aug 2009 23:25:36 +0000 (+0000) Subject: $wgMaximumMovedPages should only count moved pages X-Git-Tag: 1.31.0-rc.0~40226 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_del%27%2C%20idvote=vote.voteid%29%20%7D%7D?a=commitdiff_plain;h=cdae5a2db3d3c4aaf6b12f772a414bce13afbb8c;p=lhc%2Fweb%2Fwiklou.git $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. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 7419fefd84..d777907cba 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -414,6 +414,7 @@ this. Was used when mwEmbed was going to be an extension. * Fixed XSS vulnerability for Internet Explorer clients (only pre-release versions of MediaWiki were affected). * (bug 14817) Moving a page to a subpage of itself moves it twice +* (bug 20289) $wgMaximumMovedPages should only count pages actually moved == API changes in 1.16 == diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index c90d74aa5a..b133ebaec2 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -490,6 +490,11 @@ class MovePageForm { ); $newLink = $skin->linkKnown( $newSubpage ); $extraOutput []= wfMsgHtml( 'movepage-page-moved', $oldLink, $newLink ); + ++$count; + if( $count >= $wgMaximumMovedPages ) { + $extraOutput []= wfMsgExt( 'movepage-max-pages', array( 'parsemag', 'escape' ), $wgLang->formatNum( $wgMaximumMovedPages ) ); + break; + } } else { $oldLink = $skin->linkKnown( $oldSubpage ); $newLink = $skin->link( $newSubpage ); @@ -497,11 +502,6 @@ class MovePageForm { } } - ++$count; - if( $count >= $wgMaximumMovedPages ) { - $extraOutput []= wfMsgExt( 'movepage-max-pages', array( 'parsemag', 'escape' ), $wgLang->formatNum( $wgMaximumMovedPages ) ); - break; - } } if( $extraOutput !== array() ) {