From: Brad Jorsch Date: Mon, 14 Jan 2013 17:20:52 +0000 (-0500) Subject: Fix API list=deletedrevs continuation in mode 1 X-Git-Tag: 1.31.0-rc.0~20468 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=154a0a03aa545762663c98eeea40417425f8c430;p=lhc%2Fweb%2Fwiklou.git Fix API list=deletedrevs continuation in mode 1 r86782 introduced validation of parameter combinations for list=deletedrevs, but screwed up in that it disallowed drcontinue in "mode 1" (list all deleted revisions for the specified titles). Apparently no one uses this much, because it doesn't seem to have been reported as a bug despite being broken since April 2011. Change-Id: I30691d04fab759ee56fb4156d475fbb21b81ab45 --- diff --git a/includes/api/ApiQueryDeletedrevs.php b/includes/api/ApiQueryDeletedrevs.php index 31812cffe1..819c1bf8e8 100644 --- a/includes/api/ApiQueryDeletedrevs.php +++ b/includes/api/ApiQueryDeletedrevs.php @@ -74,7 +74,7 @@ class ApiQueryDeletedrevs extends ApiQueryBase { if ( $mode == 'revs' || $mode == 'user' ) { // Ignore namespace and unique due to inability to know whether they were purposely set - foreach( array( 'from', 'to', 'prefix', /*'namespace',*/ 'continue', /*'unique'*/ ) as $p ) { + foreach( array( 'from', 'to', 'prefix', /*'namespace', 'unique'*/ ) as $p ) { if ( !is_null( $params[$p] ) ) { $this->dieUsage( "The '{$p}' parameter cannot be used in modes 1 or 2", 'badparams' ); } @@ -361,7 +361,7 @@ class ApiQueryDeletedrevs extends ApiQueryBase { 'namespace' => 'Only list pages in this namespace (3)', 'user' => 'Only list revisions by this user', 'excludeuser' => 'Don\'t list revisions by this user', - 'continue' => 'When more results are available, use this to continue (3)', + 'continue' => 'When more results are available, use this to continue (1, 3)', 'unique' => 'List only one revision for each page (3)', ); } @@ -399,7 +399,6 @@ class ApiQueryDeletedrevs extends ApiQueryBase { array( 'code' => 'badparams', 'info' => "The 'from' parameter cannot be used in modes 1 or 2" ), array( 'code' => 'badparams', 'info' => "The 'to' parameter cannot be used in modes 1 or 2" ), array( 'code' => 'badparams', 'info' => "The 'prefix' parameter cannot be used in modes 1 or 2" ), - array( 'code' => 'badparams', 'info' => "The 'continue' parameter cannot be used in modes 1 or 2" ), array( 'code' => 'badparams', 'info' => "The 'start' parameter cannot be used in mode 3" ), array( 'code' => 'badparams', 'info' => "The 'end' parameter cannot be used in mode 3" ), ) );