From: Roan Kattouw Date: Mon, 18 Aug 2008 20:48:45 +0000 (+0000) Subject: (bug 15228) Throw a warning instead of an error when revids= and redirects are combin... X-Git-Tag: 1.31.0-rc.0~45814 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=fe833aeddc7c88b6bdbb535faf7926e644817619;p=lhc%2Fweb%2Fwiklou.git (bug 15228) Throw a warning instead of an error when revids= and redirects are combined. Also fixed a bug that caused warnings thrown in ApiPageSet.php to appear in an tag rather than --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c081abf7e6..f251348a4a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -160,6 +160,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * list=search doesn't list missing pages any more * (bug 15178) Added clshow to prop=categories to allow filtering for hidden/ non-hidden categories +* (bug 15228) Combining revids= and redirects now throws a warning instead of an + error, and still resolves redirects generated by the generator. === Languages updated in 1.14 === diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php index cfb342c591..32d4500fd9 100644 --- a/includes/api/ApiPageSet.php +++ b/includes/api/ApiPageSet.php @@ -53,7 +53,7 @@ class ApiPageSet extends ApiQueryBase { private $mRequestedPageFields; public function __construct($query, $resolveRedirects = false) { - parent :: __construct($query, __CLASS__); + parent :: __construct($query, 'query'); $this->mAllPages = array (); $this->mTitles = array(); @@ -254,7 +254,9 @@ class ApiPageSet extends ApiQueryBase { break; case 'revids' : if($this->mResolveRedirects) - $this->dieUsage('revids may not be used with redirect resolution', 'params'); + $this->setWarning('Redirect resolution cannot be used together with the revids= parameter. '. + 'Any redirects the revids= point to have not been resolved.'); + $this->mResolveRedirects = false; $this->initFromRevIDs($revids); break; default : @@ -475,8 +477,6 @@ class ApiPageSet extends ApiQueryBase { $this->mMissingRevIDs = array_keys($remaining); // Populate all the page information - if($this->mResolveRedirects) - ApiBase :: dieDebug(__METHOD__, 'revids may not be used with redirect resolution'); $this->initFromPageIds(array_keys($pageids)); }