$wgMaximumMovedPages should only count moved pages
authorAryeh Gregor <simetrical@users.mediawiki.org>
Tue, 18 Aug 2009 23:25:36 +0000 (23:25 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Tue, 18 Aug 2009 23:25:36 +0000 (23:25 +0000)
(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
includes/specials/SpecialMovepage.php

index 7419fef..d777907 100644 (file)
@@ -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 ==
 
index c90d74a..b133eba 100644 (file)
@@ -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() ) {