summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4794141)
raw | patch | inline | side by side (parent: 4794141)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 14 Oct 2010 07:54:06 +0000 (07:54 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 14 Oct 2010 07:54:06 +0000 (07:54 +0000) |
-After we've moved the uploaded file using 'move_uploaded_file' the function 'is_uploaded_file' just fails.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20040 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20040 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/personal/generic/class_user.inc | patch | blob | history | |
gosa-plugins/goto/admin/applications/class_applicationGeneric.inc | patch | blob | history |
diff --git a/gosa-core/plugins/personal/generic/class_user.inc b/gosa-core/plugins/personal/generic/class_user.inc
index 5d4b0f3264022ed07088b9348e205b620990a676..b3ecc5f1d0d0ef3153b51312c112d8dabfd43900 100644 (file)
/* Save picture */
if (isset($_POST['picture_edit_finish'])){
- /* Check for clean upload */
- if ($_FILES['picture_file']['name'] != ""){
- if (!is_uploaded_file($_FILES['picture_file']['tmp_name'])) {
- msg_dialog::display(_("Error"), _("Cannot upload file!"), ERROR_DIALOG);
- }else{
- /* Activate new picture */
- $this->set_picture($_FILES['picture_file']['tmp_name']);
+ /* Check for clean upload */
+ if ($_FILES['picture_file']['name'] != ""){
+ if (!file_exists($_FILES['picture_file']['tmp_name'])) {
+ msg_dialog::display(_("Error"), _("Cannot upload file!"), ERROR_DIALOG);
+ }else{
+ /* Activate new picture */
+ $this->set_picture($_FILES['picture_file']['tmp_name']);
+ }
}
- }
- $this->picture_dialog= FALSE;
+ $this->picture_dialog= FALSE;
$this->dialog= FALSE;
$this->is_modified= TRUE;
}
if (array_key_exists($val."_file", $_FILES) &&
array_key_exists('name', $_FILES[$val."_file"]) &&
$_FILES[$val."_file"]['name'] != "" &&
- is_uploaded_file($_FILES[$val."_file"]['tmp_name'])) {
+ is_readable($_FILES[$val."_file"]['tmp_name'])) {
$this->set_cert("$val", $_FILES[$val."_file"]['tmp_name']);
}
}
diff --git a/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc b/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc
index 0041bd90f2bbac8143934d11368500222cf2da0f..7bb990cc6fcf2e057387a9ddd41342baf3571f3d 100644 (file)
/* Check for picture upload */
if (isset($_FILES['picture_file']['name']) && $_FILES['picture_file']['name'] != ""){
- if (!is_uploaded_file($_FILES['picture_file']['tmp_name'])) {
+ if (!is_readable($_FILES['picture_file']['tmp_name'])) {
msg_dialog::display(_("Error"), msgPool::incorrectUpload(), ERROR_DIALOG);
}