diff options
author | Sam Reed <reedy@users.mediawiki.org> | 2011-01-05 22:11:39 +0000 |
---|---|---|
committer | Sam Reed <reedy@users.mediawiki.org> | 2011-01-05 22:11:39 +0000 |
commit | 27c07317c401ad0d51d396e64c994e815ede49bf (patch) | |
tree | 9e7422494ae66be60d530036ed886efb4d35f353 | |
parent | c5c5092156b6a805a9552587375d6594dd3a5f67 (diff) | |
download | mediawikicore-27c07317c401ad0d51d396e64c994e815ede49bf.tar.gz mediawikicore-27c07317c401ad0d51d396e64c994e815ede49bf.zip |
* (bug 26480) add a pppageprops param to prop=pageprops
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/79675
-rw-r--r-- | RELEASE-NOTES | 1 | ||||
-rw-r--r-- | includes/api/ApiQueryPageProps.php | 14 |
2 files changed, 13 insertions, 2 deletions
diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 3f4221480ffe..f4ebccd85257 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 eb8eaa92f486..1e9fa48150bb 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() { |