as 'edit', 'new', 'log' instead of 0, 1, 2, respectively.
* Compatibility fix for PHP 5.0.x.
* Add rctype parameter to list=recentchanges that filters by type
+* Add apprtype and apprlevel parameters to filter list=allpages by protection types and levels
+* Add apdir parameter to enable listing all pages from Z to A
=== Languages updated in 1.12 ===
$prlevel = $params['prlevel'];
if (!is_null($prlevel) && $prlevel != '' && $prlevel != '*')
$this->addWhereFld('pr_level', $prlevel);
+
+ $this->addOption('DISTINCT');
$forceNameTitleIndex = false;
$limit = $params['limit'];
$this->addOption('LIMIT', $limit+1);
- $this->addOption('ORDER BY', 'page_namespace, page_title');
+ $this->addOption('ORDER BY', 'page_namespace, page_title' .
+ ($params['dir'] == 'ZtoA' ? ' DESC' : ''));
$res = $this->select(__METHOD__);
),
'prtype' => array (
ApiBase :: PARAM_TYPE => $wgRestrictionTypes,
+ ApiBase :: PARAM_ISMULTI => true
),
'prlevel' => array (
ApiBase :: PARAM_TYPE => $wgRestrictionLevels,
+ ApiBase :: PARAM_ISMULTI => true
),
'limit' => array (
ApiBase :: PARAM_DFLT => 10,
ApiBase :: PARAM_MIN => 1,
ApiBase :: PARAM_MAX => ApiBase :: LIMIT_BIG1,
ApiBase :: PARAM_MAX2 => ApiBase :: LIMIT_BIG2
+ ),
+ 'dir' => array (
+ ApiBase :: PARAM_DFLT => 'AtoZ',
+ ApiBase :: PARAM_TYPE => array (
+ 'AtoZ',
+ 'ZtoA'
+ )
)
);
}
'prefix' => 'Search for all page titles that begin with this value.',
'namespace' => 'The namespace to enumerate.',
'filterredir' => 'Which pages to list.',
+ 'dir' => 'The direction in which to list',
'minsize' => 'Limit to pages with at least this many bytes',
'maxsize' => 'Limit to pages with at most this many bytes',
'prtype' => 'Limit to protected pages only',