diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-12-08 09:55:49 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-12-08 09:55:49 +0100 |
commit | 4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch) | |
tree | af68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /includes/api/ApiQueryQueryPage.php | |
parent | af4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff) |
Update to MediaWiki 1.22.0
Diffstat (limited to 'includes/api/ApiQueryQueryPage.php')
-rw-r--r-- | includes/api/ApiQueryQueryPage.php | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/includes/api/ApiQueryQueryPage.php b/includes/api/ApiQueryQueryPage.php index b03bdfb8..79fe0498 100644 --- a/includes/api/ApiQueryQueryPage.php +++ b/includes/api/ApiQueryQueryPage.php @@ -32,27 +32,18 @@ class ApiQueryQueryPage extends ApiQueryGeneratorBase { private $qpMap; - /** - * Some query pages are useless because they're available elsewhere in the API - */ - private $uselessQueryPages = array( - 'MIMEsearch', // aiprop=mime - 'LinkSearch', // list=exturlusage - 'FileDuplicateSearch', // prop=duplicatefiles - ); - public function __construct( $query, $moduleName ) { parent::__construct( $query, $moduleName, 'qp' ); // We need to do this to make sure $wgQueryPages is set up // This SUCKS global $IP; - require_once( "$IP/includes/QueryPage.php" ); + require_once "$IP/includes/QueryPage.php"; // Build mapping from special page names to QueryPage classes - global $wgQueryPages; + global $wgQueryPages, $wgAPIUselessQueryPages; $this->qpMap = array(); foreach ( $wgQueryPages as $page ) { - if( !in_array( $page[1], $this->uselessQueryPages ) ) { + if ( !in_array( $page[1], $wgAPIUselessQueryPages ) ) { $this->qpMap[$page[1]] = $page[0]; } } @@ -222,4 +213,8 @@ class ApiQueryQueryPage extends ApiQueryGeneratorBase { 'api.php?action=query&list=querypage&qppage=Ancientpages' ); } + + public function getHelpUrls() { + return 'https://www.mediawiki.org/wiki/API:Querypage'; + } } |