From 42df1fec8f796ec507539bb0d651bcf62ea9e44e Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Thu, 19 Feb 2009 20:21:18 +0000 Subject: [PATCH] (bug 17570) $wgMaxRedirects is now correctly respected when following redirects (was previously one more than $wgMaxRedirects) --- RELEASE-NOTES | 2 ++ includes/Title.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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(); -- 2.20.1