* (bug 26480) add a pppageprops param to prop=pageprops

This commit is contained in:
Sam Reed 2011-01-05 22:11:39 +00:00
parent c5c5092156
commit 27c07317c4
2 changed files with 13 additions and 2 deletions

View 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 ===

View 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() {