X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryBacklinks.php;h=1df14e0b8aec4b9b8b99a946db0c4b2e72a8c84a;hb=6f8a05822e08a3aaf1f41221d33e030e9bb3c56c;hp=a0786b05c6a9468c2fccd59cedcb5f2ae7c3372a;hpb=73a1b801e6627d5be2d01804674f8b21abb31806;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryBacklinks.php b/includes/api/ApiQueryBacklinks.php index a0786b05c6..1df14e0b8a 100644 --- a/includes/api/ApiQueryBacklinks.php +++ b/includes/api/ApiQueryBacklinks.php @@ -194,7 +194,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase { $a = array( 'pageid' => intval( $row->page_id ) ); ApiQueryBase::addTitleInfo( $a, $t ); if ( $row->page_is_redirect ) { - $a['redirect'] = ''; + $a['redirect'] = true; } // Put all the results in an array first $this->resultArr[$a['pageid']] = $a; @@ -313,7 +313,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase { $a['pageid'] = intval( $row->page_id ); ApiQueryBase::addTitleInfo( $a, Title::makeTitle( $row->page_namespace, $row->page_title ) ); if ( $row->page_is_redirect ) { - $a['redirect'] = ''; + $a['redirect'] = true; } $parentID = $this->pageMap[$ns][$row->{$this->bl_title}]; // Put all the results in an array first @@ -338,7 +338,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase { if ( $this->params['limit'] == 'max' ) { $this->params['limit'] = $this->getMain()->canApiHighLimits() ? $botMax : $userMax; - $result->setParsedLimit( $this->getModuleName(), $this->params['limit'] ); + $result->addParsedLimit( $this->getModuleName(), $this->params['limit'] ); } else { $this->params['limit'] = intval( $this->params['limit'] ); $this->validateLimit( 'limit', $this->params['limit'], 1, $userMax, $botMax ); @@ -426,7 +426,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase { $data = array_map( function ( $arr ) use ( $result, $code ) { if ( isset( $arr['redirlinks'] ) ) { $arr['redirlinks'] = array_values( $arr['redirlinks'] ); - $result->setIndexedTagName( $arr['redirlinks'], $code ); + ApiResult::setIndexedTagName( $arr['redirlinks'], $code ); } return $arr; }, array_values( $this->resultArr ) ); @@ -482,7 +482,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase { $hasRedirs = true; } if ( $hasRedirs ) { - $result->setIndexedTagName_internal( + $result->addIndexedTagName( array( 'query', $this->getModuleName(), $idx, 'redirlinks' ), $this->bl_code ); } @@ -494,7 +494,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase { } } - $result->setIndexedTagName_internal( + $result->addIndexedTagName( array( 'query', $this->getModuleName() ), $this->bl_code ); @@ -550,7 +550,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase { return $retval; } - public function getExamplesMessages() { + protected function getExamplesMessages() { static $examples = array( 'backlinks' => array( 'action=query&list=backlinks&bltitle=Main%20Page'