summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d07b03a)
raw | patch | inline | side by side (parent: d07b03a)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 17 Nov 2010 09:16:10 +0000 (09:16 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 17 Nov 2010 09:16:10 +0000 (09:16 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20257 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/mail/personal/mail/sieve/class_sieveManagement.inc | patch | blob | history |
diff --git a/gosa-plugins/mail/personal/mail/sieve/class_sieveManagement.inc b/gosa-plugins/mail/personal/mail/sieve/class_sieveManagement.inc
index 1c1da4e2f8b73cadc0c4c0aadad6cdc2c02d3306..0fea778601cf5f5981e43e13b1ae459a310ff390 100644 (file)
$file = $_FILES['Script_To_Import'];
+ $filename = gosa_file_name($file['tmp_name']);
+
if($file['size'] == 0){
msg_dialog::display(_("Error"), _("Uploaded script is empty!"), ERROR_DIALOG);
- }elseif(!file_exists($file['tmp_name'])){
- msg_dialog::display(_("Internal error"), sprintf(_("Cannot access temporary file '%s'!"), $file['tmp_name']), ERROR_DIALOG);
- }elseif(!is_readable ($file['tmp_name'])){
- msg_dialog::display(_("SIEVE error"), sprintf(_("Cannot open temporary file '%s'!"), $file['tmp_name']), ERROR_DIALOG);
+ }elseif(!file_exists($filename)){
+ msg_dialog::display(_("Internal error"), sprintf(_("Cannot access temporary file '%s'!"), $filename), ERROR_DIALOG);
+ }elseif(!is_readable ($filename)){
+ msg_dialog::display(_("SIEVE error"), sprintf(_("Cannot open temporary file '%s'!"), $filename), ERROR_DIALOG);
}else{
- $contents = file_get_contents($file['tmp_name']);
+ $contents = file_get_contents($filename);
$this->scripts[$this->current_script]['SCRIPT'] = $contents;
if(!$this->current_handler->parse($contents)){