r82509 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82508‎ | r82509 | r82510 >
Date:13:51, 20 February 2011
Author:reedy
Status:ok
Tags:
Comment:
Remove error duplication in ApiQueryStashImageInfo by using non hardcoded prefix in ApiQueryImageInfo
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryImageInfo.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryStashImageInfo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryImageInfo.php
@@ -500,7 +500,7 @@
501501 public function getPossibleErrors() {
502502 $p = $this->getModulePrefix();
503503 return array_merge( parent::getPossibleErrors(), array(
504 - array( 'code' => 'iiurlwidth', 'info' => 'iiurlheight cannot be used without iiurlwidth' ),
 504+ array( 'code' => 'iiurlwidth', 'info' => "{$p}urlheight cannot be used without {$p}urlwidth" ),
505505 array( 'code' => 'urlparam', 'info' => "Invalid value for {$p}urlparam" ),
506506 array( 'code' => 'urlparam_no_width', 'info' => "{$p}urlparam requires {$p}urlwidth" ),
507507 array( 'code' => 'urlparam_urlwidth_mismatch', 'info' => "The width set in {$p}urlparm doesnt't " .
Index: trunk/phase3/includes/api/ApiQueryStashImageInfo.php
@@ -137,12 +137,6 @@
138138 return 'Returns image information for stashed images';
139139 }
140140
141 - public function getPossibleErrors() {
142 - return array_merge( parent::getPossibleErrors(), array(
143 - array( 'code' => 'siiurlwidth', 'info' => 'siiurlheight cannot be used without iiurlwidth' ),
144 - ) );
145 - }
146 -
147141 protected function getExamples() {
148142 return array(
149143 'api.php?action=query&prop=stashimageinfo&siisessionkey=124sd34rsdf567',

Follow-up revisions

RevisionCommit summaryAuthorDate
r82510Followup r82509, prefix the code for urlwidth tooreedy13:59, 20 February 2011

Status & tagging log