From: Bryan Tong Minh Date: Sat, 20 Mar 2010 22:38:48 +0000 (+0000) Subject: UploadBase::getTitle(): X-Git-Tag: 1.31.0-rc.0~37406 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=453cf392b17e87ae4d3ca54caf9d78cffec2f6b2;p=lhc%2Fweb%2Fwiklou.git UploadBase::getTitle(): * Remove misleading intermediate variable. * Remove duplicate title construction --- diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index ca9f6a5d0f..8e0f7a3ad7 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -417,9 +417,7 @@ abstract class UploadBase { * 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 @@ abstract class UploadBase { 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; }