From c68615febe000f57bc0e330ea680c378dc2c5084 Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh Date: Sat, 30 Aug 2008 22:07:59 +0000 Subject: [PATCH] Fix a few undeclared variables in upload warning code. --- includes/UploadFromBase.php | 4 ++-- includes/specials/SpecialUpload.php | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/includes/UploadFromBase.php b/includes/UploadFromBase.php index 81a60cee3f..1a8fae8c3a 100644 --- a/includes/UploadFromBase.php +++ b/includes/UploadFromBase.php @@ -214,7 +214,7 @@ class UploadFromBase { # If the file existed before and was deleted, warn the user of this # Don't bother doing so if the file exists now, however if( $this->mLocalFile->wasDeleted() && !$this->mLocalFile->exists() ) - $warning['filewasdeleted'] = true; + $warning['filewasdeleted'] = $this->mLocalFile->getTitle(); return $warning; } @@ -737,7 +737,7 @@ class UploadFromBase { return array( 'exists', $file ); if( $file->getTitle()->getArticleID() ) - return array( 'page-exists', false ); + return array( 'page-exists', $file ); if( strpos( $file->getName(), '.' ) == false ) { $partname = $file->getName(); diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index d2a55f0333..24f68c5b72 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -509,7 +509,7 @@ class UploadForm { * @access private */ function uploadWarning( $warnings ) { - global $wgOut; + global $wgOut, $wgUser; global $wgUseCopyrightUpload; $this->mSessionKey = $this->mUpload->stashSession(); @@ -517,6 +517,8 @@ class UploadForm { # Couldn't save file; an error has been displayed so let's go. return; } + + $sk = $wgUser->getSkin(); $wgOut->addHTML( '

' . wfMsgHtml( 'uploadwarning' ) . "

\n" ); $wgOut->addHTML( '