From 5b5deecd99e739a620c06f72e4fad1ac05ce72ab Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 10 Aug 2006 06:29:57 +0000 Subject: [PATCH] Fixed picture removement git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4454 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/generic/class_user.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index 720114707..985b6f01d 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -86,7 +86,7 @@ class user extends plugin /* attribute list for save action */ var $attributes= array("sn", "givenName", "uid", "personalTitle", "academicTitle", "homePostalAddress", "homePhone", "labeledURI", "o", "ou", "dateOfBirth", "gender","preferredLanguage", - "departmentNumber", "employeeNumber", "employeeType", "l", "st", + "departmentNumber", "employeeNumber", "employeeType", "l", "st","jpegPhoto", "roomNumber", "telephoneNumber", "mobile", "pager", "cn", "userPKCS12", "postalAddress", "facsimileTelephoneNumber", "userSMIMECertificate"); @@ -310,8 +310,8 @@ class user extends plugin /* Remove picture? */ if (isset($_POST['picture_remove'])){ + $this->set_picture (); $this->jpegPhoto= "*removed*"; - $this->set_picture ("./images/default.jpg"); $this->is_modified= TRUE; return($smarty->fetch (get_template_path('generic_picture.tpl', TRUE, dirname(__FILE__)))); @@ -1118,9 +1118,9 @@ class user extends plugin /* Load picture from file to object */ - function set_picture($filename) + function set_picture($filename ="") { - if (!is_file($filename)){ + if (!is_file($filename) || $filename == ""){ $filename= "./images/default.jpg"; $this->jpegPhoto= "*removed*"; } -- 2.30.2