(bug 15228) Throw a warning instead of an error when revids= and redirects are combin...
authorRoan Kattouw <catrope@users.mediawiki.org>
Mon, 18 Aug 2008 20:48:45 +0000 (20:48 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Mon, 18 Aug 2008 20:48:45 +0000 (20:48 +0000)
RELEASE-NOTES
includes/api/ApiPageSet.php

index c081abf..f251348 100644 (file)
@@ -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 ===
 
index cfb342c..32d4500 100644 (file)
@@ -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));
        }