summaryrefslogtreecommitdiff
path: root/includes/api/ApiQueryIWLinks.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/ApiQueryIWLinks.php
parentc27b2e832fe25651ef2410fae85b41072aae7519 (diff)
Update to MediaWiki 1.25.1
Diffstat (limited to 'includes/api/ApiQueryIWLinks.php')
-rw-r--r--includes/api/ApiQueryIWLinks.php51
1 files changed, 17 insertions, 34 deletions
diff --git a/includes/api/ApiQueryIWLinks.php b/includes/api/ApiQueryIWLinks.php
index a185ee24..aca3f700 100644
--- a/includes/api/ApiQueryIWLinks.php
+++ b/includes/api/ApiQueryIWLinks.php
@@ -129,7 +129,7 @@ class ApiQueryIWLinks extends ApiQueryBase {
}
}
- ApiResult::setContent( $entry, $row->iwl_title );
+ ApiResult::setContentValue( $entry, 'title', $row->iwl_title );
$fit = $this->addPageSubItem( $row->iwl_from, $entry );
if ( !$fit ) {
$this->setContinueEnumParameter(
@@ -147,24 +147,12 @@ class ApiQueryIWLinks extends ApiQueryBase {
public function getAllowedParams() {
return array(
- 'url' => array(
- ApiBase::PARAM_DFLT => false,
- ApiBase::PARAM_DEPRECATED => true,
- ),
'prop' => array(
ApiBase::PARAM_ISMULTI => true,
ApiBase::PARAM_TYPE => array(
'url',
)
),
- 'limit' => array(
- ApiBase::PARAM_DFLT => 10,
- ApiBase::PARAM_TYPE => 'limit',
- ApiBase::PARAM_MIN => 1,
- ApiBase::PARAM_MAX => ApiBase::LIMIT_BIG1,
- ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2
- ),
- 'continue' => null,
'prefix' => null,
'title' => null,
'dir' => array(
@@ -174,32 +162,27 @@ class ApiQueryIWLinks extends ApiQueryBase {
'descending'
)
),
- );
- }
-
- public function getParamDescription() {
- return array(
- 'prop' => array(
- 'Which additional properties to get for each interlanguage link',
- ' url - Adds the full URL',
+ 'limit' => array(
+ ApiBase::PARAM_DFLT => 10,
+ ApiBase::PARAM_TYPE => 'limit',
+ ApiBase::PARAM_MIN => 1,
+ ApiBase::PARAM_MAX => ApiBase::LIMIT_BIG1,
+ ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2
+ ),
+ 'continue' => array(
+ ApiBase::PARAM_HELP_MSG => 'api-help-param-continue',
+ ),
+ 'url' => array(
+ ApiBase::PARAM_DFLT => false,
+ ApiBase::PARAM_DEPRECATED => true,
),
- 'url' => "Whether to get the full URL (Cannot be used with {$this->getModulePrefix()}prop)",
- 'limit' => 'How many interwiki links to return',
- 'continue' => 'When more results are available, use this to continue',
- 'prefix' => 'Prefix for the interwiki',
- 'title' => "Interwiki link to search for. Must be used with {$this->getModulePrefix()}prefix",
- 'dir' => 'The direction in which to list',
);
}
- public function getDescription() {
- return 'Returns all interwiki links from the given page(s).';
- }
-
- public function getExamples() {
+ protected function getExamplesMessages() {
return array(
- 'api.php?action=query&prop=iwlinks&titles=Main%20Page'
- => 'Get interwiki links from the [[Main Page]]',
+ 'action=query&prop=iwlinks&titles=Main%20Page'
+ => 'apihelp-query+iwlinks-example-simple',
);
}