}
/**
- * Override parent method to make sure to make sure the repo's DB is used
- * which may not necesarilly be the same as the local DB.
+ * Override parent method to make sure the repo's DB is used
+ * which may not necessarily be the same as the local DB.
*
* TODO: allow querying non-local repos.
* @return DatabaseBase
$this->addFields( LocalFile::selectFields() );
$ascendingOrder = true;
- if ( $params['dir'] == 'descending' || $params['dir'] == 'older') {
+ if ( $params['dir'] == 'descending' || $params['dir'] == 'older' ) {
$ascendingOrder = false;
}
// Pagination
if ( !is_null( $params['continue'] ) ) {
$cont = explode( '|', $params['continue'] );
- if ( count( $cont ) != 1 ) {
- $this->dieUsage( 'Invalid continue param. You should pass the ' .
- 'original value returned by the previous query', '_badcontinue' );
- }
+ $this->dieContinueUsageIf( count( $cont ) != 1 );
$op = ( $ascendingOrder ? '>' : '<' );
$continueFrom = $db->addQuotes( $cont[0] );
$this->addWhere( "img_name $op= $continueFrom" );
array( 'code' => 'mimesearchdisabled', 'info' => 'MIME search disabled in Miser Mode' ),
array( 'code' => 'invalidsha1hash', 'info' => 'The SHA1 hash provided is not valid' ),
array( 'code' => 'invalidsha1base36hash', 'info' => 'The SHA1Base36 hash provided is not valid' ),
- array( 'code' => '_badcontinue', 'info' => 'Invalid continue param. You should pass the original value returned by the previous query' ),
) );
}
public function getHelpUrls() {
return 'https://www.mediawiki.org/wiki/API:Allimages';
}
-
- public function getVersion() {
- return __CLASS__ . ': $Id$';
- }
}