Show a warning message when uploading empty files (e.g. due to typos)

This commit is contained in:
Jens Frank 2004-08-03 18:57:04 +00:00
parent d53a5b7add
commit 3e4e98b51c
3 changed files with 5 additions and 0 deletions

View file

@ -138,6 +138,9 @@ class UploadForm {
if ( $wgUploadSizeWarning && ( $this->mUploadSize > $wgUploadSizeWarning ) ) {
$warning .= '<li>'.wfMsg( "largefile" ).'</li>';
}
if ( $this->mUploadSize == 0 ) {
$warning .= '<li>'.wfMsg( "emptyfile" ).'</li>';
}
if( $nt->getArticleID() ) {
$sk = $wgUser->getSkin();
$dname = $wgLang->getNsText( Namespace::getImage() ) . ":{$this->mUploadSaveName}";

View file

@ -876,6 +876,7 @@ agrees to license it under the terms of the $1.",
'badfilename' => "Image name has been changed to \"$1\".",
'badfiletype' => "\".$1\" is not a recommended image file format.",
'largefile' => 'It is recommended that images not exceed 100k in size.',
'emptyfile' => 'The file you uploaded seems to be empty. This might be due to a typo in the file name. Please check whether you really want to upload this file.',
'fileexists' => 'A file with this name exists already, please check $1 if you are not sure if you want to change it.',
'successfulupload' => 'Successful upload',
'fileuploaded' => "File uploaded successfully.

View file

@ -676,6 +676,7 @@ Alle Zeiten sind UTC.
"badfilename" => "Der Bildname wurde in \"$1\" geändert.",
"badfiletype" => "\".$1\" ist kein empfohlenes Dateiformat.",
"largefile" => "Bitte keine Bilder über 100 KByte hochladen.",
'emptyfile' => "Die hochgeladene Datei ist leer. Der Grund kann ein Tippfehler im Dateinamen sein. Bitte kontrollieren Sie, ob Sie die Datei wirklich hochladen wollen.",
"successfulupload" => "Erfolgreich hochgeladen",
"fileuploaded" => "Die Datei \"$1\" wurde erfolgreich hochgeladen. Bitte
verwenden Sie diesen ($2) Link zur Beschreibungsseite und füllen Sie die