* @file
*/
-if ( !defined( 'MEDIAWIKI' ) ) {
- // Eclipse helper - will be ignored in production
- require_once( 'ApiQueryBase.php' );
-}
-
/**
* Query module to enumerate all categories, even the ones that don't have
* category pages.
/**
* @param $resultPageSet ApiPageSet
- * @return void
*/
private function run( $resultPageSet = null ) {
$db = $this->getDB();
$min = $params['min'];
$max = $params['max'];
- $this->addWhereRange( 'cat_pages', $dir, $min, $max );
+ if ( $dir == 'newer' ) {
+ $this->addWhereRange( 'cat_pages', 'newer', $min, $max );
+ } else {
+ $this->addWhereRange( 'cat_pages', 'older', $max, $min);
+ }
+
if ( isset( $params['prefix'] ) ) {
$this->addWhere( 'cat_title' . $db->buildLike( $this->titlePartToKey( $params['prefix'] ), $db->anyString() ) );
}
public function getHelpUrls() {
- return 'http://www.mediawiki.org/wiki/API:Allcategories';
+ return 'https://www.mediawiki.org/wiki/API:Allcategories';
}
public function getVersion() {