From 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Mon, 12 Aug 2013 09:28:15 +0200 Subject: Update to MediaWiki 1.21.1 --- includes/api/ApiQueryPageProps.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'includes/api/ApiQueryPageProps.php') diff --git a/includes/api/ApiQueryPageProps.php b/includes/api/ApiQueryPageProps.php index 1eef67e6..2de57106 100644 --- a/includes/api/ApiQueryPageProps.php +++ b/includes/api/ApiQueryPageProps.php @@ -49,7 +49,7 @@ class ApiQueryPageProps extends ApiQueryBase { $this->addTables( 'page_props' ); $this->addFields( array( 'pp_page', 'pp_propname', 'pp_value' ) ); - $this->addWhereFld( 'pp_page', array_keys( $pages ) ); + $this->addWhereFld( 'pp_page', array_keys( $pages ) ); if ( $this->params['continue'] ) { $this->addWhere( 'pp_page >=' . intval( $this->params['continue'] ) ); @@ -60,7 +60,10 @@ class ApiQueryPageProps extends ApiQueryBase { } # Force a sort order to ensure that properties are grouped by page - $this->addOption( 'ORDER BY', 'pp_page' ); + # But only if pp_page is not constant in the WHERE clause. + if ( count( $pages ) > 1 ) { + $this->addOption( 'ORDER BY', 'pp_page' ); + } $res = $this->select( __METHOD__ ); $currentPage = 0; # Id of the page currently processed @@ -122,14 +125,16 @@ class ApiQueryPageProps extends ApiQueryBase { public function getAllowedParams() { return array( 'continue' => null, - 'prop' => null, + 'prop' => array( + ApiBase::PARAM_ISMULTI => true, + ), ); } public function getParamDescription() { return array( 'continue' => 'When more results are available, use this to continue', - 'prop' => 'Page prop to look on the page for. Useful for checking whether a certain page uses a certain page prop.' + 'prop' => 'Only list these props. Useful for checking whether a certain page uses a certain page prop', ); } @@ -146,8 +151,4 @@ class ApiQueryPageProps extends ApiQueryBase { public function getHelpUrls() { return 'https://www.mediawiki.org/wiki/API:Properties#pageprops_.2F_pp'; } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } -- cgit v1.2.3-54-g00ecf