r62415 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62414‎ | r62415 | r62416 >
Date:01:41, 13 February 2010
Author:reedy
Status:ok
Tags:
Comment:
Stylize API files
Modified paths:
  • /trunk/phase3/includes/api/ApiMain.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryImageInfo.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryInfo.php (modified) (history)
  • /trunk/phase3/includes/api/ApiUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiMain.php
@@ -415,7 +415,7 @@
416416 if ( !$this->mInternalMode ) {
417417 // Ignore mustBePosted() for internal calls
418418 if ( $module->mustBePosted() && !$this->mRequest->wasPosted() )
419 - $this->dieUsageMsg( array ('mustbeposted', $this->mAction ) );
 419+ $this->dieUsageMsg( array ( 'mustbeposted', $this->mAction ) );
420420
421421 // See if custom printer is used
422422 $this->mPrinter = $module->getCustomPrinter();
Index: trunk/phase3/includes/api/ApiQueryImageInfo.php
@@ -318,7 +318,7 @@
319319 return array (
320320 'Returns image information and upload history'
321321 );
322 - }
 322+ }
323323
324324 public function getPossibleErrors() {
325325 return array_merge( parent::getPossibleErrors(), array(
Index: trunk/phase3/includes/api/ApiQueryInfo.php
@@ -332,7 +332,7 @@
333333
334334 $pageInfo['preload'] = $text;
335335 }
336 - }
 336+ }
337337 return $pageInfo;
338338 }
339339
Index: trunk/phase3/includes/api/ApiUpload.php
@@ -138,9 +138,9 @@
139139 // Cleanup any temporary mess
140140 $this->mUpload->cleanupTempFile();
141141
142 - if( isset($result['chunked-output']) ) {
143 - foreach ($result['chunked-output'] as $key => $value) {
144 - if($value === null) $value = "";
 142+ if ( isset( $result['chunked-output'] ) ) {
 143+ foreach ( $result['chunked-output'] as $key => $value ) {
 144+ if ( $value === null ) $value = "";
145145 $this->getResult()->addValue( null, $key, $value );
146146 }
147147 } else {
@@ -248,8 +248,8 @@
249249 $this->getResult()->setIndexedTagName( $result['details'], 'error' );
250250
251251 $this->dieUsage( 'An internal error occurred', 'internal-error', 0, $error );
252 - } elseif( $this->mParams['enablechunks'] ) {
253 - return array("chunked-output" => $status->value);
 252+ } elseif ( $this->mParams['enablechunks'] ) {
 253+ return array( "chunked-output" => $status->value );
254254 }
255255
256256 $file = $this->mUpload->getLocalFile();

Status & tagging log