From d9022f63880ce039446fba8364f68e656b7bf4cb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 3 May 2012 13:01:35 +0200 Subject: Update to MediaWiki 1.19.0 --- includes/api/ApiQueryQueryPage.php | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'includes/api/ApiQueryQueryPage.php') diff --git a/includes/api/ApiQueryQueryPage.php b/includes/api/ApiQueryQueryPage.php index b38df6b6..5eba0de6 100644 --- a/includes/api/ApiQueryQueryPage.php +++ b/includes/api/ApiQueryQueryPage.php @@ -24,11 +24,6 @@ * @file */ -if ( !defined( 'MEDIAWIKI' ) ) { - // Eclipse helper - will be ignored in production - require_once( 'ApiQueryBase.php' ); -} - /** * Query module to get the results of a QueryPage-based special page * @@ -73,15 +68,13 @@ class ApiQueryQueryPage extends ApiQueryGeneratorBase { /** * @param $resultPageSet ApiPageSet - * @return void */ public function run( $resultPageSet = null ) { - global $wgUser; $params = $this->extractRequestParams(); $result = $this->getResult(); $qp = new $this->qpMap[$params['page']](); - if ( !$qp->userCanExecute( $wgUser ) ) { + if ( !$qp->userCanExecute( $this->getUser() ) ) { $this->dieUsageMsg( 'specialpage-cantexecute' ); } @@ -98,7 +91,7 @@ class ApiQueryQueryPage extends ApiQueryGeneratorBase { } } $result->addValue( array( 'query' ), $this->getModuleName(), $r ); - + if ( $qp->isCached() && !$qp->isCacheable() ) { // Disabled query page, don't run the query return; @@ -183,10 +176,11 @@ class ApiQueryQueryPage extends ApiQueryGeneratorBase { public function getPossibleErrors() { return array_merge( parent::getPossibleErrors(), array( + array( 'specialpage-cantexecute' ) ) ); } - protected function getExamples() { + public function getExamples() { return array( 'api.php?action=query&list=querypage&qppage=Ancientpages' ); -- cgit v1.2.3-54-g00ecf