diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-08-12 09:28:15 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-08-12 09:28:15 +0200 |
commit | 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 (patch) | |
tree | 577a29fb579188d16003a209ce2a2e9c5b0aa2bd /includes/api/ApiQueryCategoryMembers.php | |
parent | cacc939b34e315b85e2d72997811eb6677996cc1 (diff) |
Update to MediaWiki 1.21.1
Diffstat (limited to 'includes/api/ApiQueryCategoryMembers.php')
-rw-r--r-- | includes/api/ApiQueryCategoryMembers.php | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/includes/api/ApiQueryCategoryMembers.php b/includes/api/ApiQueryCategoryMembers.php index 55ce0234..9dbd8593 100644 --- a/includes/api/ApiQueryCategoryMembers.php +++ b/includes/api/ApiQueryCategoryMembers.php @@ -78,7 +78,7 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase { $this->addFieldsIf( 'cl_timestamp', $fld_timestamp || $params['sort'] == 'timestamp' ); - $this->addTables( array( 'page', 'categorylinks' ) ); // must be in this order for 'USE INDEX' + $this->addTables( array( 'page', 'categorylinks' ) ); // must be in this order for 'USE INDEX' $this->addWhereFld( 'cl_to', $categoryTitle->getDBkey() ); $queryTypes = $params['type']; @@ -106,11 +106,7 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase { } else { if ( $params['continue'] ) { $cont = explode( '|', $params['continue'], 3 ); - if ( count( $cont ) != 3 ) { - $this->dieUsage( 'Invalid continue param. You should pass the original value returned '. - 'by the previous query', '_badcontinue' - ); - } + $this->dieContinueUsageIf( count( $cont ) != 3 ); // Remove the types to skip from $queryTypes $contTypeIndex = array_search( $cont[0], $queryTypes ); @@ -118,7 +114,7 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase { // Add a WHERE clause for sortkey and from // pack( "H*", $foo ) is used to convert hex back to binary - $escSortkey = $this->getDB()->addQuotes( pack( "H*", $cont[1] ) ); + $escSortkey = $this->getDB()->addQuotes( pack( 'H*', $cont[1] ) ); $from = intval( $cont[2] ); $op = $dir == 'newer' ? '>' : '<'; // $contWhere is used further down @@ -247,7 +243,7 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase { if ( is_null( $resultPageSet ) ) { $result->setIndexedTagName_internal( - array( 'query', $this->getModuleName() ), 'cm' ); + array( 'query', $this->getModuleName() ), 'cm' ); } } @@ -403,7 +399,6 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase { $this->getTitleOrPageIdErrorMessage(), array( array( 'code' => 'invalidcategory', 'info' => 'The category name you entered is not valid' ), - array( 'code' => 'badcontinue', 'info' => 'Invalid continue param. You should pass the original value returned by the previous query' ), ) ); } @@ -418,8 +413,4 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase { public function getHelpUrls() { return 'https://www.mediawiki.org/wiki/API:Categorymembers'; } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } |