r74840 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74839‎ | r74840 | r74841 >
Date:17:28, 16 October 2010
Author:catrope
Status:deferred
Tags:
Comment:
uploadwizard: join -> implode, - 1 -> -1
Modified paths:
  • /branches/uploadwizard/phase3/includes/api/ApiQueryImageInfo.php (modified) (history)
  • /branches/uploadwizard/phase3/includes/upload/SessionStash.php (modified) (history)
  • /branches/uploadwizard/phase3/includes/upload/UploadBase.php (modified) (history)

Diff [purge]

Index: branches/uploadwizard/phase3/includes/upload/UploadBase.php
@@ -623,7 +623,7 @@
624624 * If the user does not supply all necessary information in the first upload form submission (either by accident or
625625 * by design) then we may want to stash the file temporarily, get more information, and publish the file later.
626626 *
627 - * This method will stash a file in a temporary directory for later processing, and save the necessary descriptive info
 627+ * This method will stash a file in a temporary directory for later processing, and save the necessary descriptive info
628628 * into the user's session.
629629 * This method returns the file object, which also has a 'sessionKey' property which can be passed through a form or
630630 * API request to find this stashed file again.
Index: branches/uploadwizard/phase3/includes/upload/SessionStash.php
@@ -128,7 +128,7 @@
129129 $error = array( 'unknown', 'no error recorded' );
130130 }
131131 }
132 - throw new SessionStashFileException( "error storing file in '$path': " . join( '; ', $error ) );
 132+ throw new SessionStashFileException( "error storing file in '$path': " . implode( '; ', $error ) );
133133 }
134134 $stashPath = $status->value;
135135
Index: branches/uploadwizard/phase3/includes/api/ApiQueryImageInfo.php
@@ -185,11 +185,11 @@
186186 */
187187 public function getScale( $params ) {
188188 $p = $this->getModulePrefix();
189 - if ( $params['urlheight'] != - 1 && $params['urlwidth'] == - 1 ) {
 189+ if ( $params['urlheight'] != -1 && $params['urlwidth'] == -1 ) {
190190 $this->dieUsage( "${p}urlheight cannot be used without {$p}urlwidth", "{$p}urlwidth" );
191191 }
192192
193 - if ( $params['urlwidth'] != - 1 ) {
 193+ if ( $params['urlwidth'] != -1 ) {
194194 $scale = array();
195195 $scale['width'] = $params['urlwidth'];
196196 $scale['height'] = $params['urlheight'];
@@ -335,11 +335,11 @@
336336 ),
337337 'urlwidth' => array(
338338 ApiBase::PARAM_TYPE => 'integer',
339 - ApiBase::PARAM_DFLT => - 1
 339+ ApiBase::PARAM_DFLT => -1
340340 ),
341341 'urlheight' => array(
342342 ApiBase::PARAM_TYPE => 'integer',
343 - ApiBase::PARAM_DFLT => - 1
 343+ ApiBase::PARAM_DFLT => -1
344344 ),
345345 'continue' => null,
346346 );

Status & tagging log