$suboptions,
$haveModules
);
- $numSubmodules = count( $submodules );
}
$module->modifyHelp( $help, $suboptions, $haveModules );
* @return ApiResult
*/
private function getModuleInfo( $module ) {
- $result = $this->getResult();
$ret = array();
$path = $module->getModulePath();
private function formatLimitReportData( $limitReportData ) {
$result = array();
- $apiResult = $this->getResult();
foreach ( $limitReportData as $name => $value ) {
$entry = array();
}
$restrictionTypes = $titleObj->getRestrictionTypes();
- $db = $this->getDB();
$protections = array();
$expiryarray = array();
}
if ( $fld_implicitgroups || $fld_groups || $fld_rights ) {
- $user = User::newFromId( $row->user_id );
$implicitGroups = User::newFromId( $row->user_id )->getAutomaticGroups();
if ( isset( $row->groups ) && $row->groups !== '' ) {
$groups = array_merge( $implicitGroups, explode( '|', $row->groups ) );
// Parse and validate continuation parameter
$this->cont = array();
if ( $this->params['continue'] !== null ) {
- $db = $this->getDB();
$cont = explode( '|', $this->params['continue'] );
switch ( count( $cont ) ) {
* @return array|null Key-val array of 'width' and 'height', or null
*/
public function getScale( $params ) {
- $p = $this->getModulePrefix();
-
if ( $params['urlwidth'] != -1 ) {
$scale = array();
$scale['width'] = $params['urlwidth'];
);
}
- $result = $this->getResult();
ApiResult::setIndexedTagName( $data, 'db' );
return $this->getResult()->addValue( 'query', $property, $data );
// BC transformations
$boolKeys = null;
- $forceKVP = false;
if ( isset( $transforms['BC'] ) ) {
if ( !is_array( $transforms['BC'] ) ) {
throw new InvalidArgumentException( __METHOD__ . ':Value for "BC" must be an array' );
protected function transformWarnings( $warnings ) {
if ( $warnings ) {
// Add indices
- $result = $this->getResult();
ApiResult::setIndexedTagName( $warnings, 'warning' );
if ( isset( $warnings['duplicate'] ) ) {