From 453cf392b17e87ae4d3ca54caf9d78cffec2f6b2 Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh Date: Sat, 20 Mar 2010 22:38:48 +0000 Subject: [PATCH] UploadBase::getTitle(): * Remove misleading intermediate variable. * Remove duplicate title construction --- includes/upload/UploadBase.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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; } -- 2.20.1