r63984 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63983‎ | r63984 | r63985 >
Date:22:38, 20 March 2010
Author:btongminh
Status:ok
Tags:
Comment:
UploadBase::getTitle():
* Remove misleading intermediate variable.
* Remove duplicate title construction
Modified paths:
  • /trunk/phase3/includes/upload/UploadBase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/upload/UploadBase.php
@@ -417,9 +417,7 @@
418418 * filter out illegal characters, and try to make a legible name
419419 * out of it. We'll strip some silently that Title would die on.
420420 */
421 - $basename = $this->mDesiredDestName;
422 -
423 - $this->mFilteredName = wfStripIllegalFilenameChars( $basename );
 421+ $this->mFilteredName = wfStripIllegalFilenameChars( $this->mDesiredDestName );
424422 /* Normalize to title form before we do any further processing */
425423 $nt = Title::makeTitleSafe( NS_FILE, $this->mFilteredName );
426424 if( is_null( $nt ) ) {
@@ -466,11 +464,6 @@
467465 return $this->mTitle = null;
468466 }
469467
470 - $nt = Title::makeTitleSafe( NS_FILE, $this->mFilteredName );
471 - if( is_null( $nt ) ) {
472 - $this->mTitleError = self::ILLEGAL_FILENAME;
473 - return $this->mTitle = null;
474 - }
475468 return $this->mTitle = $nt;
476469 }
477470

Status & tagging log