X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryExtLinksUsage.php;h=faabb920ebba179666e37f5bba3b2245770e1009;hb=c7844017c040885512b83e0e70b7bdfbcd0e9ab7;hp=070681c2997ee1e7ca5c4c7ab0ee3d86798fab20;hpb=e0dfd130374d1d4daef1fe2aa34b2d0b416420e8;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryExtLinksUsage.php b/includes/api/ApiQueryExtLinksUsage.php index 070681c299..faabb920eb 100644 --- a/includes/api/ApiQueryExtLinksUsage.php +++ b/includes/api/ApiQueryExtLinksUsage.php @@ -59,9 +59,8 @@ class ApiQueryExtLinksUsage extends ApiQueryGeneratorBase { $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'] ); @@ -209,7 +208,6 @@ class ApiQueryExtLinksUsage extends ApiQueryGeneratorBase { } public function getParamDescription() { - global $wgMiserMode; $p = $this->getModulePrefix(); $desc = array( 'prop' => array( @@ -230,7 +228,7 @@ class ApiQueryExtLinksUsage extends ApiQueryGeneratorBase { '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", @@ -241,31 +239,10 @@ class ApiQueryExtLinksUsage extends ApiQueryGeneratorBase { 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'