http://www.mediawiki.org/wiki/Special:Code/MediaWiki/63984
Revision: 63984 Author: btongminh Date: 2010-03-20 22:38:48 +0000 (Sat, 20 Mar 2010) Log Message: ----------- UploadBase::getTitle(): * Remove misleading intermediate variable. * Remove duplicate title construction Modified Paths: -------------- trunk/phase3/includes/upload/UploadBase.php Modified: trunk/phase3/includes/upload/UploadBase.php =================================================================== --- trunk/phase3/includes/upload/UploadBase.php 2010-03-20 20:27:56 UTC (rev 63983) +++ trunk/phase3/includes/upload/UploadBase.php 2010-03-20 22:38:48 UTC (rev 63984) @@ -417,9 +417,7 @@ * filter out illegal characters, and try to make a legible name * out of it. We'll strip some silently that Title would die on. */ - $basename = $this->mDesiredDestName; - - $this->mFilteredName = wfStripIllegalFilenameChars( $basename ); + $this->mFilteredName = wfStripIllegalFilenameChars( $this->mDesiredDestName ); /* Normalize to title form before we do any further processing */ $nt = Title::makeTitleSafe( NS_FILE, $this->mFilteredName ); if( is_null( $nt ) ) { @@ -466,11 +464,6 @@ return $this->mTitle = null; } - $nt = Title::makeTitleSafe( NS_FILE, $this->mFilteredName ); - if( is_null( $nt ) ) { - $this->mTitleError = self::ILLEGAL_FILENAME; - return $this->mTitle = null; - } return $this->mTitle = $nt; } _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs