diff options
Diffstat (limited to 'includes/api/ApiQueryImages.php')
-rw-r--r-- | includes/api/ApiQueryImages.php | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/includes/api/ApiQueryImages.php b/includes/api/ApiQueryImages.php index 6052a75f4573..16d54aad06ee 100644 --- a/includes/api/ApiQueryImages.php +++ b/includes/api/ApiQueryImages.php @@ -62,10 +62,7 @@ class ApiQueryImages extends ApiQueryGeneratorBase { $this->addWhereFld( 'il_from', array_keys( $this->getPageSet()->getGoodTitles() ) ); if ( !is_null( $params['continue'] ) ) { $cont = explode( '|', $params['continue'] ); - if ( count( $cont ) != 2 ) { - $this->dieUsage( 'Invalid continue param. You should pass the ' . - 'original value returned by the previous query', '_badcontinue' ); - } + $this->dieContinueUsageIf( count( $cont ) != 2 ); $op = $params['dir'] == 'descending' ? '<' : '>'; $ilfrom = intval( $cont[0] ); $ilto = $this->getDB()->addQuotes( $cont[1] ); @@ -185,12 +182,6 @@ class ApiQueryImages extends ApiQueryGeneratorBase { return 'Returns all images contained on the given page(s)'; } - public function getPossibleErrors() { - return array_merge( parent::getPossibleErrors(), array( - array( 'code' => '_badcontinue', 'info' => 'Invalid continue param. You should pass the original value returned by the previous query' ), - ) ); - } - public function getExamples() { return array( 'api.php?action=query&prop=images&titles=Main%20Page' => 'Get a list of images used in the [[Main Page]]', |