}
}
+ ApiResult::setArrayType( $data, 'BCarray' );
ApiResult::setIndexedTagName( $data, 'ns' );
return $this->getResult()->addValue( 'query', $property, $data );
$groups = array_intersect( $rights[$group], $allGroups );
if ( $groups ) {
$arr[$type] = $groups;
+ ApiResult::setArrayType( $arr[$type], 'BCarray' );
ApiResult::setIndexedTagName( $arr[$type], 'group' );
}
}
'semiprotectedlevels' => $config->get( 'SemiprotectedRestrictionLevels' ),
);
+ ApiResult::setArrayType( $data['types'], 'BCarray' );
+ ApiResult::setArrayType( $data['levels'], 'BCarray' );
+ ApiResult::setArrayType( $data['cascadinglevels'], 'BCarray' );
+ ApiResult::setArrayType( $data['semiprotectedlevels'], 'BCarray' );
+
ApiResult::setIndexedTagName( $data['types'], 'type' );
ApiResult::setIndexedTagName( $data['levels'], 'level' );
ApiResult::setIndexedTagName( $data['cascadinglevels'], 'level' );
global $wgParser;
$wgParser->firstCallInit();
$tags = array_map( array( $this, 'formatParserTags' ), $wgParser->getTags() );
+ ApiResult::setArrayType( $tags, 'BCarray' );
ApiResult::setIndexedTagName( $tags, 't' );
return $this->getResult()->addValue( 'query', $property, $tags );
global $wgParser;
$wgParser->firstCallInit();
$hooks = $wgParser->getFunctionHooks();
+ ApiResult::setArrayType( $hooks, 'BCarray' );
ApiResult::setIndexedTagName( $hooks, 'h' );
return $this->getResult()->addValue( 'query', $property, $hooks );
public function appendVariables( $property ) {
$variables = MagicWord::getVariableIDs();
+ ApiResult::setArrayType( $variables, 'BCarray' );
ApiResult::setIndexedTagName( $variables, 'v' );
return $this->getResult()->addValue( 'query', $property, $variables );
public function appendProtocols( $property ) {
// Make a copy of the global so we don't try to set the _element key of it - bug 45130
$protocols = array_values( $this->getConfig()->get( 'UrlProtocols' ) );
+ ApiResult::setArrayType( $protocols, 'BCarray' );
ApiResult::setIndexedTagName( $protocols, 'p' );
return $this->getResult()->addValue( 'query', $property, $protocols );
'subscribers' => array_map( array( 'SpecialVersion', 'arrayToString' ), $subscribers ),
);
+ ApiResult::setArrayType( $arr['subscribers'], 'BCarray' );
ApiResult::setIndexedTagName( $arr['subscribers'], 's' );
$data[] = $arr;
}