API: Overhaul ApiResult, make format=xml not throw, and add json formatversion
[lhc/web/wiklou.git] / includes / api / ApiQueryBacklinks.php
index 5e17a5c..92cf62d 100644 (file)
@@ -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
                        );