Code

Fixed printer removement
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 Jun 2006 07:41:22 +0000 (07:41 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 Jun 2006 07:41:22 +0000 (07:41 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3923 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/environment/class_environment.inc

index 39ff5e2006251682d3fb770dd0323be24d6e3e61..6c06c7817eef67853cedabcbcdf60b029d3afbc5 100644 (file)
@@ -799,7 +799,6 @@ class environment extends plugin
 
     /* Als smarty vars are set. Get smarty template and generate output */
     $display.= $smarty->fetch(get_template_path('environment.tpl', TRUE,dirname(__FILE__)));
-    
     return($display);
   }
 
@@ -978,7 +977,13 @@ class environment extends plugin
           if($this->uid==$user){
             unset($attr['goto'.$s_suffix.'Printer'][$key]);
           }
-        }    
+        }
+        $tmp = array();
+        foreach($attr['goto'.$s_suffix.'Printer'] as $user){
+          $tmp[] = $user;
+        }
+        $attr['goto'.$s_suffix.'Printer'] = array();  
+        $attr['goto'.$s_suffix.'Printer'] = $tmp;
       }
 
       /* Remove administrational entries (Admin)*/
@@ -988,6 +993,12 @@ class environment extends plugin
             unset($attr['goto'.$s_suffix.'AdminPrinter'][$key]);
           }
         }    
+        $tmp = array();
+        foreach($attr['goto'.$s_suffix.'AdminPrinter'] as $user){
+          $tmp[] = $user;
+        }
+        $attr['goto'.$s_suffix.'AdminPrinter'] = array();  
+        $attr['goto'.$s_suffix.'AdminPrinter'] = $tmp;
       }
 
       /* Extract useable tags, to be able to save all changes