(bug 17570) $wgMaxRedirects is now correctly respected when following redirects ...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 19 Feb 2009 20:21:18 +0000 (20:21 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 19 Feb 2009 20:21:18 +0000 (20:21 +0000)
RELEASE-NOTES
includes/Title.php

index 06c34d3..3ee34d3 100644 (file)
@@ -195,6 +195,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 17556) <link> parameters in Special:Contributions feeds (RSS and Atom)
   now point to the actual contributors' feed.
 * ForeignApiRepos now fetch MIME types, rather than trying to figure it locally
+* (bug 17570) $wgMaxRedirects is now correctly respected when following
+  redirects (was previously one more than $wgMaxRedirects)
 
 == API changes in 1.15 ==
 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions
index 37cd0b9..94ad845 100644 (file)
@@ -339,7 +339,7 @@ class Title {
                // recursive check to follow double redirects
                $recurse = $wgMaxRedirects;
                $titles = array( $title );
-               while( --$recurse >= 0 ) {
+               while( --$recurse > 0 ) {
                        if( $title->isRedirect() ) {
                                $article = new Article( $title, 0 );
                                $newtitle = $article->getRedirectTarget();