From cdae5a2db3d3c4aaf6b12f772a414bce13afbb8c Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Tue, 18 Aug 2009 23:25:36 +0000 Subject: [PATCH] $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. --- RELEASE-NOTES | 1 + includes/specials/SpecialMovepage.php | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) 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() ) { -- 2.20.1