added upload failed message also to vfs-upload widget

This commit is contained in:
Ralf Becker 2010-02-05 04:09:17 +00:00
parent 936c636ffd
commit bba515d2e2

View File

@ -461,7 +461,14 @@ class vfs_widget
}
$tmp_name = etemplate::get_array($_FILES['exec']['tmp_name'],$name);
$error = etemplate::get_array($_FILES['exec']['error'],$name);
if ($error || empty($tmp_name) || function_exists('is_uploaded_file') && !is_uploaded_file($tmp_name) || !file_exists($tmp_name))
if ($error)
{
etemplate::set_validation_error($name,lang('Error uploading file!')."\n".
etemplate::max_upload_size_message());
$loop = true;
return false;
}
if (empty($tmp_name) || function_exists('is_uploaded_file') && !is_uploaded_file($tmp_name) || !file_exists($tmp_name))
{
return false;
}