r83249 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83248‎ | r83249 | r83250 >
Date:22:21, 4 March 2011
Author:bawolff
Status:ok
Tags:
Comment:
trim the upload_by_url field from upload form, since if you have an extra space at the beggining like I
did when copying and pasting a url, gives a really misleading error message.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/upload/UploadFromUrl.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/upload/UploadFromUrl.php
@@ -68,7 +68,7 @@
6969 $desiredDestName = $request->getText( 'wpUploadFileURL' );
7070 return $this->initialize(
7171 $desiredDestName,
72 - $request->getVal( 'wpUploadFileURL' ),
 72+ trim( $request->getVal( 'wpUploadFileURL' ) ),
7373 false
7474 );
7575 }
Index: trunk/phase3/RELEASE-NOTES
@@ -157,6 +157,8 @@
158158 exist.
159159 * (bug 27763) Article::getParserOutput() no longer throws a fatal given when an
160160 incorrect revision ID is passed.
 161+* Trim the form field for uploading by url to remove extra spaces which could
 162+ cause confusing error messages.
161163
162164 === API changes in 1.18 ===
163165 * (bug 26339) Throw warning when truncating an overlarge API result

Status & tagging log