From 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Mon, 12 Aug 2013 09:28:15 +0200 Subject: Update to MediaWiki 1.21.1 --- includes/api/ApiQueryImages.php | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'includes/api/ApiQueryImages.php') diff --git a/includes/api/ApiQueryImages.php b/includes/api/ApiQueryImages.php index 6052a75f..f2bf0a7b 100644 --- a/includes/api/ApiQueryImages.php +++ b/includes/api/ApiQueryImages.php @@ -49,7 +49,7 @@ class ApiQueryImages extends ApiQueryGeneratorBase { */ private function run( $resultPageSet = null ) { if ( $this->getPageSet()->getGoodTitleCount() == 0 ) { - return; // nothing to do + return; // nothing to do } $params = $this->extractRequestParams(); @@ -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]]', @@ -201,8 +192,4 @@ class ApiQueryImages extends ApiQueryGeneratorBase { public function getHelpUrls() { return 'https://www.mediawiki.org/wiki/API:Properties#images_.2F_im'; } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } -- cgit v1.2.3-54-g00ecf