summaryrefslogtreecommitdiff
path: root/includes/api/ApiQuery.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2008-03-21 11:49:34 +0100
committerPierre Schmitz <pierre@archlinux.de>2008-03-21 11:49:34 +0100
commit086ae52d12011746a75f5588e877347bc0457352 (patch)
treee73263c7a29d0f94fafb874562610e16eb292ba8 /includes/api/ApiQuery.php
parent749e7fb2bae7bbda855de3c9e319435b9f698ff7 (diff)
Update auf MediaWiki 1.12.0
Diffstat (limited to 'includes/api/ApiQuery.php')
-rw-r--r--includes/api/ApiQuery.php26
1 files changed, 22 insertions, 4 deletions
diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php
index 76dbb338..29abd859 100644
--- a/includes/api/ApiQuery.php
+++ b/includes/api/ApiQuery.php
@@ -60,9 +60,12 @@ class ApiQuery extends ApiBase {
private $mQueryListModules = array (
'allpages' => 'ApiQueryAllpages',
'alllinks' => 'ApiQueryAllLinks',
+ 'allcategories' => 'ApiQueryAllCategories',
'allusers' => 'ApiQueryAllUsers',
'backlinks' => 'ApiQueryBacklinks',
+ 'blocks' => 'ApiQueryBlocks',
'categorymembers' => 'ApiQueryCategoryMembers',
+ 'deletedrevs' => 'ApiQueryDeletedrevs',
'embeddedin' => 'ApiQueryBacklinks',
'imageusage' => 'ApiQueryBacklinks',
'logevents' => 'ApiQueryLogEvents',
@@ -71,11 +74,14 @@ class ApiQuery extends ApiBase {
'usercontribs' => 'ApiQueryContributions',
'watchlist' => 'ApiQueryWatchlist',
'exturlusage' => 'ApiQueryExtLinksUsage',
+ 'users' => 'ApiQueryUsers',
+ 'random' => 'ApiQueryRandom',
);
private $mQueryMetaModules = array (
'siteinfo' => 'ApiQuerySiteinfo',
'userinfo' => 'ApiQueryUserInfo',
+ 'allmessages' => 'ApiQueryAllmessages',
);
private $mSlaveDB = null;
@@ -143,6 +149,13 @@ class ApiQuery extends ApiBase {
public function getPageSet() {
return $this->mPageSet;
}
+
+ /**
+ * Get the array mapping module names to class names
+ */
+ function getModules() {
+ return array_merge($this->mQueryPropModules, $this->mQueryListModules, $this->mQueryMetaModules);
+ }
/**
* Query execution happens in the following steps:
@@ -375,7 +388,7 @@ class ApiQuery extends ApiBase {
* Returns the list of allowed parameters for this module.
* Qurey module also lists all ApiPageSet parameters as its own.
*/
- protected function getAllowedParams() {
+ public function getAllowedParams() {
return array (
'prop' => array (
ApiBase :: PARAM_ISMULTI => true,
@@ -456,8 +469,13 @@ class ApiQuery extends ApiBase {
$psModule = new ApiPageSet($this);
return $psModule->makeHelpMsgParameters() . parent :: makeHelpMsgParameters();
}
+
+ // @todo should work correctly
+ public function shouldCheckMaxlag() {
+ return true;
+ }
- protected function getParamDescription() {
+ public function getParamDescription() {
return array (
'prop' => 'Which properties to get for the titles/revisions/pageids',
'list' => 'Which lists to get',
@@ -468,7 +486,7 @@ class ApiQuery extends ApiBase {
);
}
- protected function getDescription() {
+ public function getDescription() {
return array (
'Query API module allows applications to get needed pieces of data from the MediaWiki databases,',
'and is loosely based on the Query API interface currently available on all MediaWiki servers.',
@@ -485,7 +503,7 @@ class ApiQuery extends ApiBase {
public function getVersion() {
$psModule = new ApiPageSet($this);
$vers = array ();
- $vers[] = __CLASS__ . ': $Id: ApiQuery.php 24494 2007-07-31 17:53:37Z yurik $';
+ $vers[] = __CLASS__ . ': $Id: ApiQuery.php 30222 2008-01-28 19:05:26Z catrope $';
$vers[] = $psModule->getVersion();
return $vers;
}