From: Brad Jorsch Date: Sat, 2 Jun 2012 13:41:06 +0000 (+0200) Subject: (bug 32643) Prevent action=purge&forcelinkupdate crash X-Git-Tag: 1.31.0-rc.0~23395^2 X-Git-Url: http://git.cyclocoop.org/%22.%20generer_url_ecrire%28%22sites_tous%22%2C%22%22%29.%20%22?a=commitdiff_plain;h=c42131dd8ed052cabf78875a374ffc351f1fea38;p=lhc%2Fweb%2Fwiklou.git (bug 32643) Prevent action=purge&forcelinkupdate crash action=purge with forcelinkupdate crashes when the rate limit is reached, because the module passes an array rather than a string to setWarning. The appropriate string is in the 'info' key of the array, so just use that. Change-Id: Ia0215290197e115e7272f945ab1bc5b81aeec80a --- diff --git a/RELEASE-NOTES-1.20 b/RELEASE-NOTES-1.20 index f034999b32..07d93eec85 100644 --- a/RELEASE-NOTES-1.20 +++ b/RELEASE-NOTES-1.20 @@ -131,6 +131,7 @@ upgrade PHP if you have not done so prior to upgrading MediaWiki. * (bug 28814) add properties to output of action=parse * (bug 33224) add variants of content language to meta=siteinfo * (bug 36761) "Mark pages as visited" now submits previously established filter options +* (bug 32643) action=purge with forcelinkupdate no longer crashes when ratelimit is reached === Languages updated in 1.20 === diff --git a/includes/api/ApiPurge.php b/includes/api/ApiPurge.php index 8ef9cbc0e3..8e9c198fbb 100644 --- a/includes/api/ApiPurge.php +++ b/includes/api/ApiPurge.php @@ -104,7 +104,8 @@ class ApiPurge extends ApiBase { $pcache->save( $p_result, $page, $popts ); } } else { - $this->setWarning( $this->parseMsg( array( 'actionthrottledtext' ) ) ); + $error = $this->parseMsg( array( 'actionthrottledtext' ) ); + $this->setWarning( $error['info'] ); $forceLinkUpdate = false; } }