diff options
Diffstat (limited to 'includes/api/ApiQueryLangBacklinks.php')
-rw-r--r-- | includes/api/ApiQueryLangBacklinks.php | 40 |
1 files changed, 10 insertions, 30 deletions
diff --git a/includes/api/ApiQueryLangBacklinks.php b/includes/api/ApiQueryLangBacklinks.php index 34842c63..7be18b2f 100644 --- a/includes/api/ApiQueryLangBacklinks.php +++ b/includes/api/ApiQueryLangBacklinks.php @@ -131,7 +131,7 @@ class ApiQueryLangBacklinks extends ApiQueryGeneratorBase { ApiQueryBase::addTitleInfo( $entry, $title ); if ( $row->page_is_redirect ) { - $entry['redirect'] = ''; + $entry['redirect'] = true; } if ( $lllang ) { @@ -154,7 +154,7 @@ class ApiQueryLangBacklinks extends ApiQueryGeneratorBase { } if ( is_null( $resultPageSet ) ) { - $result->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), 'll' ); + $result->addIndexedTagName( array( 'query', $this->getModuleName() ), 'll' ); } else { $resultPageSet->populateFromTitles( $pages ); } @@ -168,7 +168,9 @@ class ApiQueryLangBacklinks extends ApiQueryGeneratorBase { return array( 'lang' => null, 'title' => null, - 'continue' => null, + 'continue' => array( + ApiBase::PARAM_HELP_MSG => 'api-help-param-continue', + ), 'limit' => array( ApiBase::PARAM_DFLT => 10, ApiBase::PARAM_TYPE => 'limit', @@ -194,34 +196,12 @@ class ApiQueryLangBacklinks extends ApiQueryGeneratorBase { ); } - public function getParamDescription() { - return array( - 'lang' => 'Language for the language link', - 'title' => "Language link to search for. Must be used with {$this->getModulePrefix()}lang", - 'continue' => 'When more results are available, use this to continue', - 'prop' => array( - 'Which properties to get', - ' lllang - Adds the language code of the language link', - ' lltitle - Adds the title of the language link', - ), - 'limit' => 'How many total pages to return', - 'dir' => 'The direction in which to list', - ); - } - - public function getDescription() { - return array( 'Find all pages that link to the given language link.', - 'Can be used to find all links with a language code, or', - 'all links to a title (with a given language).', - 'Using neither parameter is effectively "All Language Links".', - 'Note that this may not consider language links added by extensions.', - ); - } - - public function getExamples() { + protected function getExamplesMessages() { return array( - 'api.php?action=query&list=langbacklinks&lbltitle=Test&lbllang=fr', - 'api.php?action=query&generator=langbacklinks&glbltitle=Test&glbllang=fr&prop=info' + 'action=query&list=langbacklinks&lbltitle=Test&lbllang=fr' + => 'apihelp-query+langbacklinks-example-simple', + 'action=query&generator=langbacklinks&glbltitle=Test&glbllang=fr&prop=info' + => 'apihelp-query+langbacklinks-example-generator', ); } |