summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7b27d03)
raw | patch | inline | side by side (parent: 7b27d03)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 17 Nov 2010 09:15:24 +0000 (09:15 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 17 Nov 2010 09:15:24 +0000 (09:15 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20245 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/applications/class_applicationGeneric.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc b/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc
index 7bb990cc6fcf2e057387a9ddd41342baf3571f3d..119ebacf5a3507bd1b0fb5b9a9fa196e2813ce38 100644 (file)
$this->gotoLogonScript= $this->generateTemplate().preg_replace('/.*### END HEADER ###/s', '', $this->gotoLogonScript);
if((isset($_POST['upLoad']))&&(isset($_FILES['ScriptFile'])) && !preg_match("/freeze/i",$this->FAIstate)){
- $str = file_get_contents($_FILES['ScriptFile']['tmp_name']);
+ $str = file_get_contents(gosa_file_name($_FILES['ScriptFile']['tmp_name']));
$this->gotoLogonScript = $str;
}
/* Check for picture upload */
if (isset($_FILES['picture_file']['name']) && $_FILES['picture_file']['name'] != ""){
- if (!is_readable($_FILES['picture_file']['tmp_name'])) {
+ $filename = gosa_file_name($_FILES['picture_file']['tmp_name']);
+ if (!is_readable($filename)) {
msg_dialog::display(_("Error"), msgPool::incorrectUpload(), ERROR_DIALOG);
}
/* Open file and write out photoData */
$fp = fopen ($fname, "w");
- fwrite ($fp, $_FILES['picture_file']['tmp_name']);
+ fwrite ($fp, $filename);
fclose ($fp);
/* Build conversation query. Filename is generated automatically, so
} else {
/* Load the new uploaded Photo */
- if(!$handle = imagick_ReadImage($_FILES['picture_file']['tmp_name'])){
+ if(!$handle = imagick_ReadImage($filename)){
msg_dialog::display(_("Error"), msgPool::incorrectUpload(_("no read permission")), ERROR_DIALOG);
}
msg_dialog::display(_("Error"), msgPool::incorrectUpload(_("cannot convert image")), ERROR_DIALOG);
}
- if(!imagick_writeimage($handle,$_FILES['picture_file']['tmp_name'])){
- msg_dialog::display(_("Error"), msgPool::incorrectUpload(sprintf(_("cannot save image to '%s'"), $_FILES['picture_file']['tmp_name'])), ERROR_DIALOG);
+ if(!imagick_writeimage($handle,$filename)){
+ msg_dialog::display(_("Error"), msgPool::incorrectUpload(sprintf(_("cannot save image to '%s'"), $filename)), ERROR_DIALOG);
}
imagick_free($handle);
}
/* Activate new picture */
- $this->set_picture($_FILES['picture_file']['tmp_name']);
+ $this->set_picture($filename);
}
}
}