r32569 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32568‎ | r32569 | r32570 >
Date:17:40, 29 March 2008
Author:ialex
Status:old
Tags:
Comment:
(bug 13556, and possible regression from r32372) Don't show a blank form if no image is attached in Special:Upload
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SpecialUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialUpload.php
@@ -280,7 +280,7 @@
281281 $details = null;
282282 $value = null;
283283 $value = $this->internalProcessUpload( $details );
284 -
 284+
285285 switch($value) {
286286 case self::SUCCESS:
287287 $wgOut->redirect( $this->mLocalFile->getTitle()->getFullURL() );
@@ -376,11 +376,6 @@
377377 return self::BEFORE_PROCESSING;
378378 }
379379
380 - /* Check for curl error */
381 - if( $this->mCurlError ) {
382 - return self::BEFORE_PROCESSING;
383 - }
384 -
385380 /**
386381 * If there was no filename or a zero size given, give up quick.
387382 */
@@ -388,6 +383,11 @@
389384 return self::EMPTY_FILE;
390385 }
391386
 387+ /* Check for curl error */
 388+ if( $this->mCurlError ) {
 389+ return self::BEFORE_PROCESSING;
 390+ }
 391+
392392 # Chop off any directories in the given filename
393393 if( $this->mDesiredDestName ) {
394394 $basename = $this->mDesiredDestName;
@@ -998,7 +998,7 @@
999999 $val2 = $val;
10001000 }
10011001 $val2 = $wgAllowCopyUploads ? min( $wgMaxUploadSize, $val2 ) : $val2;
1002 - $maxUploadSize = wfMsgExt( 'upload-maxfilesize', array( 'parseinline', 'escape' ), $wgLang->formatSize( $val2 ) );
 1002+ $maxUploadSize = wfMsgExt( 'upload-maxfilesize', array( 'parseinline', 'escapenoentities' ), $wgLang->formatSize( $val2 ) );
10031003
10041004 $sourcefilename = wfMsgExt( 'sourcefilename', 'escapenoentities' );
10051005 $destfilename = wfMsgExt( 'destfilename', 'escapenoentities' );
Index: trunk/phase3/RELEASE-NOTES
@@ -142,8 +142,8 @@
143143 * (bug 13543) Updated FAQ link in the installer sidebar
144144 * (bug 13540) Date format in confirmation e-mail now matches message language
145145 * (bug 13554) PHP Notice in old pre-processor when list item is empty.
 146+* (bug 13556) Don't show a blank form if no image is attached in Special:Upload
146147
147 -
148148 === API changes in 1.13 ===
149149
150150 * Fixing main page display in meta=siteinfo

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r32372* Fixed call to deprecated functions...ialex15:04, 24 March 2008

Status & tagging log