From: hickert Date: Fri, 30 Jun 2006 04:35:12 +0000 (+0000) Subject: Fixed printer membership saving. array('count'=>'0') was also saved as member. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c06d2ec5e1f22bc05ae0ee91913b68b33b3e3b5e;p=gosa.git Fixed printer membership saving. array('count'=>'0') was also saved as member. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4001 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc index 9ea00d0ff..67c487600 100644 --- a/plugins/personal/environment/class_environment.inc +++ b/plugins/personal/environment/class_environment.inc @@ -956,6 +956,10 @@ class environment extends plugin /* Remove normal entries (User)*/ if(isset($attr['goto'.$s_suffix.'Printer'])) { + + /* Avoid saving count=>0 as member */ + unset($attr['goto'.$s_suffix.'Printer']['count']); + foreach($attr['goto'.$s_suffix.'Printer'] as $key => $user){ if($this->uid==$user){ unset($attr['goto'.$s_suffix.'Printer'][$key]); @@ -971,6 +975,10 @@ class environment extends plugin /* Remove administrational entries (Admin)*/ if(isset($attr['goto'.$s_suffix.'AdminPrinter'])){ + + /* Avoid saving count=>0 as member */ + unset($attr['goto'.$s_suffix.'AdminPrinter']['count']); + foreach($attr['goto'.$s_suffix.'AdminPrinter'] as $key => $user){ if($this->uid==$user){ unset($attr['goto'.$s_suffix.'AdminPrinter'][$key]);