Minor code order tweaks in ApiQueryPageProps.
authorSam Reed <reedy@users.mediawiki.org>
Wed, 5 Jan 2011 21:59:05 +0000 (21:59 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Wed, 5 Jan 2011 21:59:05 +0000 (21:59 +0000)
Remove getPossibleErrors, as it adds an error that this module doesn't through

includes/api/ApiQueryPageProps.php

index 46d04b1..eb8eaa9 100644 (file)
@@ -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',