* (bug 26480) add a pppageprops param to prop=pageprops
authorSam Reed <reedy@users.mediawiki.org>
Wed, 5 Jan 2011 22:11:39 +0000 (22:11 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Wed, 5 Jan 2011 22:11:39 +0000 (22:11 +0000)
RELEASE-NOTES
includes/api/ApiQueryPageProps.php

index 3f42214..f4ebccd 100644 (file)
@@ -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 ===
 
index eb8eaa9..1e9fa48 100644 (file)
@@ -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() {