summaryrefslogtreecommitdiff
path: root/includes/api/ApiQueryCategoryMembers.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/api/ApiQueryCategoryMembers.php')
-rw-r--r--includes/api/ApiQueryCategoryMembers.php17
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$';
- }
}