Code

fixes: #1180
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 2 May 2012 08:03:39 +0000 (08:03 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 2 May 2012 08:03:39 +0000 (08:03 +0000)
Fixed pronlems with unsaved user pictures, due to caches file sizes. Thanks to 'arodier'

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@21129 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/personal/generic/class_user.inc

index 0de16e5188d466c0eb5b922fad42311cf3731725..437ac728f0bb1b865800784cff628dc179ca62fd 100644 (file)
@@ -1448,6 +1448,7 @@ class user extends plugin
       $this->jpegPhoto= "*removed*";
     }
 
+    clearstatcache();
     $fd = fopen ($filename, "rb");
     $this->photoData= fread ($fd, filesize ($filename));
     session::set('binary',$this->photoData);
@@ -1461,6 +1462,7 @@ class user extends plugin
   /* Load certificate from file to object */
   function set_cert($cert, $filename)
   {
+    clearstatcache();
     if(!$this->acl_is_writeable("Certificate",(!is_object($this->parent) && !session::is_set('edit')))) return;
     $fd = fopen ($filename, "rb");
     if (filesize($filename)>0) {