Fix-up for I949fc289d: handle falsy cookie values correctly
[lhc/web/wiklou.git] / includes / api / ApiQueryLangBacklinks.php
index 34842c6..9f77b84 100644 (file)
@@ -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',
@@ -183,6 +185,7 @@ class ApiQueryLangBacklinks extends ApiQueryGeneratorBase {
                                        'lllang',
                                        'lltitle',
                                ),
+                               ApiBase::PARAM_HELP_MSG_PER_VALUE => array(),
                        ),
                        'dir' => array(
                                ApiBase::PARAM_DFLT => 'ascending',
@@ -194,34 +197,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',
                );
        }