Merge "API: Use message-per-value for apihelp-query+alllinks-param-prop"
[lhc/web/wiklou.git] / includes / api / ApiQueryBacklinksprop.php
index b4752ae..a50d58b 100644 (file)
@@ -277,7 +277,7 @@ class ApiQueryBacklinksprop extends ApiQueryGeneratorBase {
 
                                $vals = array();
                                if ( $fld_pageid ) {
-                                       $vals['pageid'] = $row->page_id;
+                                       $vals['pageid'] = (int)$row->page_id;
                                }
                                if ( $fld_title ) {
                                        ApiQueryBase::addTitleInfo( $vals,
@@ -287,8 +287,8 @@ class ApiQueryBacklinksprop extends ApiQueryGeneratorBase {
                                if ( $fld_fragment && $row->rd_fragment !== null && $row->rd_fragment !== '' ) {
                                        $vals['fragment'] = $row->rd_fragment;
                                }
-                               if ( $fld_redirect && $row->page_is_redirect ) {
-                                       $vals['redirect'] = '';
+                               if ( $fld_redirect ) {
+                                       $vals['redirect'] = (bool)$row->page_is_redirect;
                                }
                                $fit = $this->addPageSubItem( $id, $vals );
                                if ( !$fit ) {
@@ -335,6 +335,7 @@ class ApiQueryBacklinksprop extends ApiQueryGeneratorBase {
                                ),
                                ApiBase::PARAM_ISMULTI => true,
                                ApiBase::PARAM_DFLT => 'pageid|title',
+                               ApiBase::PARAM_HELP_MSG_PER_VALUE => array(),
                        ),
                        'namespace' => array(
                                ApiBase::PARAM_ISMULTI => true,
@@ -405,8 +406,7 @@ class ApiQueryBacklinksprop extends ApiQueryGeneratorBase {
        }
 
        public function getHelpUrls() {
-               $name = $this->getModuleName();
-               $prefix = $this->getModulePrefix();
-               return "https://www.mediawiki.org/wiki/API:Properties#{$name}_.2F_{$prefix}";
+               $name = ucfirst( $this->getModuleName() );
+               return "https://www.mediawiki.org/wiki/API:{$name}";
        }
 }