From 27c07317c401ad0d51d396e64c994e815ede49bf Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Wed, 5 Jan 2011 22:11:39 +0000 Subject: [PATCH] * (bug 26480) add a pppageprops param to prop=pageprops --- RELEASE-NOTES | 1 + includes/api/ApiQueryPageProps.php | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 3f4221480f..f4ebccd852 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -80,6 +80,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 26485) add a elextlinks param to prop=extlinks * (bug 26483) add a iwtitles param to prop=iwlinks * (bug 26484) add a lltitles param to prop=langlinks +* (bug 26480) add a pppageprops param to prop=pageprops === Languages updated in 1.18 === diff --git a/includes/api/ApiQueryPageProps.php b/includes/api/ApiQueryPageProps.php index eb8eaa92f4..1e9fa48150 100644 --- a/includes/api/ApiQueryPageProps.php +++ b/includes/api/ApiQueryPageProps.php @@ -60,6 +60,10 @@ class ApiQueryPageProps extends ApiQueryBase { $this->addWhere( 'pp_page >=' . intval( $this->params['continue'] ) ); } + if ( $this->params['prop'] ) { + $this->addWhereFld( 'pp_propname', $this->params['prop'] ); + } + # Force a sort order to ensure that properties are grouped by page $this->addOption( 'ORDER BY', 'pp_page' ); @@ -121,11 +125,17 @@ class ApiQueryPageProps extends ApiQueryBase { } public function getAllowedParams() { - return array( 'continue' => null ); + return array( + 'continue' => null, + 'prop' => null, + ); } public function getParamDescription() { - return array( 'continue' => 'When more results are available, use this to continue' ); + 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.' + ); } public function getDescription() { -- 2.20.1