(bug 32643) Prevent action=purge&forcelinkupdate crash
authorBrad Jorsch <anomie.wikipedia@gmail.com>
Sat, 2 Jun 2012 13:41:06 +0000 (15:41 +0200)
committerBrad Jorsch <anomie.wikipedia@gmail.com>
Sat, 2 Jun 2012 13:41:06 +0000 (15:41 +0200)
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

RELEASE-NOTES-1.20
includes/api/ApiPurge.php

index f034999..07d93ee 100644 (file)
@@ -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 ===
 
index 8ef9cbc..8e9c198 100644 (file)
@@ -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;
                                }
                        }