r79674 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79673‎ | r79674 | r79675 >
Date:21:59, 5 January 2011
Author:reedy
Status:ok
Tags:
Comment:
Minor code order tweaks in ApiQueryPageProps.

Remove getPossibleErrors, as it adds an error that this module doesn't through
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryPageProps.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryPageProps.php
@@ -43,8 +43,6 @@
4444 }
4545
4646 public function execute() {
47 - $this->params = $this->extractRequestParams();
48 -
4947 # Only operate on existing pages
5048 $pages = $this->getPageSet()->getGoodTitles();
5149 if ( !count( $pages ) ) {
@@ -52,6 +50,8 @@
5351 return;
5452 }
5553
 54+ $this->params = $this->extractRequestParams();
 55+
5656 $this->addTables( 'page_props' );
5757 $this->addFields( array( 'pp_page', 'pp_propname', 'pp_value' ) );
5858 $this->addWhereFld( 'pp_page', array_keys( $pages ) );
@@ -125,19 +125,13 @@
126126 }
127127
128128 public function getParamDescription() {
129 - return array( 'continue' => 'When more results are available, use this to continue' );
 129+ return array( 'continue' => 'When more results are available, use this to continue' );
130130 }
131131
132132 public function getDescription() {
133133 return 'Get various properties defined in the page content';
134134 }
135135
136 - public function getPossibleErrors() {
137 - return array_merge( parent::getPossibleErrors(), array(
138 - array( 'code' => '_badcontinue', 'info' => 'Invalid continue param. You should pass the original value returned by the previous query' ),
139 - ) );
140 - }
141 -
142136 protected function getExamples() {
143137 return array(
144138 'api.php?action=query&prop=pageprops&titles=Category:Foo',

Status & tagging log