$this->mNamedDB[$name] = wfGetDB( $db, $groups );
$this->profileDBOut();
}
+
return $this->mNamedDB[$name];
}
*/
public function getModules() {
wfDeprecated( __METHOD__, '1.21' );
+
return $this->getModuleManager()->getNamesWithClasses();
}
$gens[$name] = $class;
}
}
+
return $gens;
}
public function getCustomPrinter() {
// If &exportnowrap is set, use the raw formatter
if ( $this->getParameter( 'export' ) &&
- $this->getParameter( 'exportnowrap' ) )
- {
+ $this->getParameter( 'exportnowrap' )
+ ) {
return new ApiFormatRaw( $this->getMain(),
$this->getMain()->createPrinterByName( 'xml' ) );
} else {
}
}
$this->dieContinueUsageIf( $completeModules !== null && count( $tmp ) !== 0 );
+
return $modules;
}
} else { // private
$cacheMode = 'private';
}
+
return $cacheMode;
}
ApiQueryBase::addTitleInfo( $vals, $title );
$vals['special'] = '';
if ( $title->isSpecialPage() &&
- !SpecialPageFactory::exists( $title->getDBkey() ) ) {
+ !SpecialPageFactory::exists( $title->getDBkey() )
+ ) {
$vals['missing'] = '';
} elseif ( $title->getNamespace() == NS_MEDIA &&
- !wfFindFile( $title ) ) {
+ !wfFindFile( $title )
+ ) {
$vals['missing'] = '';
}
$pages[$fakeId] = $vals;
$this->mGeneratorContinue = array();
}
$this->mGeneratorContinue[$paramName] = $paramValue;
+
return true;
}
if ( $flags ) {
$result += $this->getPageSet()->getFinalParams( $flags );
}
+
return $result;
}
public function getParamDescription() {
return $this->getPageSet()->getFinalParamDescription() + array(
- 'prop' => 'Which properties to get for the titles/revisions/pageids. Module help is available below',
+ 'prop' => 'Which properties to get for the titles/revisions/pageids. ' .
+ 'Module help is available below',
'list' => 'Which lists to get. Module help is available below',
'meta' => 'Which metadata to get about the site. Module help is available below',
'indexpageids' => 'Include an additional pageids section listing all returned page IDs',
'export' => 'Export the current revisions of all given or generated pages',
- 'exportnowrap' => 'Return the export XML without wrapping it in an XML result (same format as Special:Export). Can only be used with export',
+ 'exportnowrap' => 'Return the export XML without wrapping it in an ' .
+ 'XML result (same format as Special:Export). Can only be used with export',
'iwurl' => 'Whether to get the full URL if the title is an interwiki link',
'continue' => array(
- 'When present, formats query-continue as key-value pairs that should simply be merged into the original request.',
+ 'When present, formats query-continue as key-value pairs that ' .
+ 'should simply be merged into the original request.',
'This parameter must be set to an empty string in the initial query.',
- 'This parameter is recommended for all new development, and will be made default in the next API version.' ),
+ 'This parameter is recommended for all new development, and ' .
+ 'will be made default in the next API version.'
+ ),
);
}
public function getDescription() {
return array(
- 'Query API module allows applications to get needed pieces of data from the MediaWiki databases,',
+ 'Query API module allows applications to get needed pieces of data ' .
+ 'from the MediaWiki databases,',
'and is loosely based on the old query.php interface.',
- 'All data modifications will first have to use query to acquire a token to prevent abuse from malicious sites'
+ 'All data modifications will first have to use query to acquire a ' .
+ 'token to prevent abuse from malicious sites'
);
}
public function getExamples() {
return array(
- 'api.php?action=query&prop=revisions&meta=siteinfo&titles=Main%20Page&rvprop=user|comment&continue=',
+ 'api.php?action=query&prop=revisions&meta=siteinfo&' .
+ 'titles=Main%20Page&rvprop=user|comment&continue=',
'api.php?action=query&generator=allpages&gapprefix=API/&prop=revisions&continue=',
);
}