From c5c5092156b6a805a9552587375d6594dd3a5f67 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Wed, 5 Jan 2011 21:59:05 +0000 Subject: [PATCH] Minor code order tweaks in ApiQueryPageProps. Remove getPossibleErrors, as it adds an error that this module doesn't through --- includes/api/ApiQueryPageProps.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/includes/api/ApiQueryPageProps.php b/includes/api/ApiQueryPageProps.php index 46d04b194d..eb8eaa92f4 100644 --- a/includes/api/ApiQueryPageProps.php +++ b/includes/api/ApiQueryPageProps.php @@ -43,8 +43,6 @@ class ApiQueryPageProps extends ApiQueryBase { } public function execute() { - $this->params = $this->extractRequestParams(); - # Only operate on existing pages $pages = $this->getPageSet()->getGoodTitles(); if ( !count( $pages ) ) { @@ -52,6 +50,8 @@ class ApiQueryPageProps extends ApiQueryBase { return; } + $this->params = $this->extractRequestParams(); + $this->addTables( 'page_props' ); $this->addFields( array( 'pp_page', 'pp_propname', 'pp_value' ) ); $this->addWhereFld( 'pp_page', array_keys( $pages ) ); @@ -125,19 +125,13 @@ class ApiQueryPageProps extends ApiQueryBase { } 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' ); } public function getDescription() { return 'Get various properties defined in the page content'; } - public function getPossibleErrors() { - return array_merge( parent::getPossibleErrors(), array( - array( 'code' => '_badcontinue', 'info' => 'Invalid continue param. You should pass the original value returned by the previous query' ), - ) ); - } - protected function getExamples() { return array( 'api.php?action=query&prop=pageprops&titles=Category:Foo', -- 2.20.1