summaryrefslogtreecommitdiff
path: root/includes/api/ApiQueryPagesWithProp.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2015-06-04 07:31:04 +0200
committerPierre Schmitz <pierre@archlinux.de>2015-06-04 07:58:39 +0200
commitf6d65e533c62f6deb21342d4901ece24497b433e (patch)
treef28adf0362d14bcd448f7b65a7aaf38650f923aa /includes/api/ApiQueryPagesWithProp.php
parentc27b2e832fe25651ef2410fae85b41072aae7519 (diff)
Update to MediaWiki 1.25.1
Diffstat (limited to 'includes/api/ApiQueryPagesWithProp.php')
-rw-r--r--includes/api/ApiQueryPagesWithProp.php39
1 files changed, 12 insertions, 27 deletions
diff --git a/includes/api/ApiQueryPagesWithProp.php b/includes/api/ApiQueryPagesWithProp.php
index b6c85253..7bcaf247 100644
--- a/includes/api/ApiQueryPagesWithProp.php
+++ b/includes/api/ApiQueryPagesWithProp.php
@@ -99,7 +99,9 @@ class ApiQueryPagesWithProp extends ApiQueryGeneratorBase {
}
if ( $resultPageSet === null ) {
- $vals = array();
+ $vals = array(
+ ApiResult::META_TYPE => 'assoc',
+ );
if ( $fld_ids ) {
$vals['pageid'] = (int)$row->page_id;
}
@@ -121,7 +123,7 @@ class ApiQueryPagesWithProp extends ApiQueryGeneratorBase {
}
if ( $resultPageSet === null ) {
- $result->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), 'page' );
+ $result->addIndexedTagName( array( 'query', $this->getModuleName() ), 'page' );
}
}
@@ -140,7 +142,9 @@ class ApiQueryPagesWithProp extends ApiQueryGeneratorBase {
'value',
)
),
- 'continue' => null,
+ 'continue' => array(
+ ApiBase::PARAM_HELP_MSG => 'api-help-param-continue',
+ ),
'limit' => array(
ApiBase::PARAM_TYPE => 'limit',
ApiBase::PARAM_DFLT => 10,
@@ -158,31 +162,12 @@ class ApiQueryPagesWithProp extends ApiQueryGeneratorBase {
);
}
- public function getParamDescription() {
- return array(
- 'propname' => 'Page prop for which to enumerate pages',
- 'prop' => array(
- 'What pieces of information to include',
- ' ids - Adds the page ID',
- ' title - Adds the title and namespace ID of the page',
- ' value - Adds the value of the page prop',
- ),
- 'dir' => 'In which direction to sort',
- 'continue' => 'When more results are available, use this to continue',
- 'limit' => 'The maximum number of pages to return',
- );
- }
-
- public function getDescription() {
- return 'List all pages using a given page prop.';
- }
-
- public function getExamples() {
+ protected function getExamplesMessages() {
return array(
- 'api.php?action=query&list=pageswithprop&pwppropname=displaytitle&pwpprop=ids|title|value'
- => 'Get first 10 pages using {{DISPLAYTITLE:}}',
- 'api.php?action=query&generator=pageswithprop&gpwppropname=notoc&prop=info'
- => 'Get page info about first 10 pages using __NOTOC__',
+ 'action=query&list=pageswithprop&pwppropname=displaytitle&pwpprop=ids|title|value'
+ => 'apihelp-query+pageswithprop-example-simple',
+ 'action=query&generator=pageswithprop&gpwppropname=notoc&prop=info'
+ => 'apihelp-query+pageswithprop-example-generator',
);
}