Code

Fixed printer membership saving. array('count'=>'0') was also saved as member.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 30 Jun 2006 04:35:12 +0000 (04:35 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 30 Jun 2006 04:35:12 +0000 (04:35 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4001 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/environment/class_environment.inc

index 9ea00d0ffdf8b9b21e5677c38263cdc46de4e46e..67c48760020980e83adfdcb112922a3992ea758b 100644 (file)
@@ -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]);