From: Alexandre Emsenhuber Date: Thu, 19 Feb 2009 20:21:18 +0000 (+0000) Subject: (bug 17570) $wgMaxRedirects is now correctly respected when following redirects ... X-Git-Tag: 1.31.0-rc.0~42786 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=42df1fec8f796ec507539bb0d651bcf62ea9e44e;p=lhc%2Fweb%2Fwiklou.git (bug 17570) $wgMaxRedirects is now correctly respected when following redirects (was previously one more than $wgMaxRedirects) --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 06c34d355c..3ee34d3f46 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -195,6 +195,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 17556) 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 diff --git a/includes/Title.php b/includes/Title.php index 37cd0b9329..94ad8457da 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -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();