From: Chad Horohoe Date: Fri, 3 Apr 2009 13:27:30 +0000 (+0000) Subject: (bug 18311) Purging images via the API now works. This is why we should use articleFr... X-Git-Tag: 1.31.0-rc.0~42243 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=ef3bdc52e7e02973ff3a35a10b14f2c992dd6304;p=lhc%2Fweb%2Fwiklou.git (bug 18311) Purging images via the API now works. This is why we should use articleFromTitle() rather than new Article(). --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 437e3d9307..e68fa9d16c 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -370,6 +370,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN message to be included in the page text * Added uiprop=changeablegroups to meta=userinfo * Added usprop=gender to list=users +* (bug 18311) action=purge now works for images too === Languages updated in 1.15 === diff --git a/includes/api/ApiPurge.php b/includes/api/ApiPurge.php index e2d00087a3..d68d1bfc36 100644 --- a/includes/api/ApiPurge.php +++ b/includes/api/ApiPurge.php @@ -65,7 +65,7 @@ class ApiPurge extends ApiBase { $result[] = $r; continue; } - $article = new Article($title); + $article = Mediawiki::articleFromTitle( $title ); $article->doPurge(); // Directly purge and skip the UI part of purge(). $r['purged'] = ''; $result[] = $r;