$this->addOption( 'USE INDEX', 'el_index' );
$this->addWhere( 'page_id=el_from' );
- global $wgMiserMode;
$miser_ns = array();
- if ( $wgMiserMode ) {
+ if ( $this->getConfig()->get( 'MiserMode' ) ) {
$miser_ns = $params['namespace'];
} else {
$this->addWhereFld( 'page_namespace', $params['namespace'] );
}
public function getParamDescription() {
- global $wgMiserMode;
$p = $this->getModulePrefix();
$desc = array(
'prop' => array(
'expandurl' => 'Expand protocol-relative URLs with the canonical protocol',
);
- if ( $wgMiserMode ) {
+ if ( $this->getConfig()->get( 'MiserMode' ) ) {
$desc['namespace'] = array(
$desc['namespace'],
"NOTE: Due to \$wgMiserMode, using this may result in fewer than \"{$p}limit\" results",
return $desc;
}
- public function getResultProperties() {
- return array(
- 'ids' => array(
- 'pageid' => 'integer'
- ),
- 'title' => array(
- 'ns' => 'namespace',
- 'title' => 'string'
- ),
- 'url' => array(
- 'url' => 'string'
- )
- );
- }
-
public function getDescription() {
return 'Enumerate pages that contain a given URL.';
}
- public function getPossibleErrors() {
- return array_merge( parent::getPossibleErrors(), array(
- array( 'code' => 'bad_query', 'info' => 'Invalid query' ),
- ) );
- }
-
public function getExamples() {
return array(
'api.php?action=query&list=exturlusage&euquery=www.mediawiki.org'