Code

Fixed printer removal
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 Jun 2006 08:17:33 +0000 (08:17 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 Jun 2006 08:17:33 +0000 (08:17 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@3928 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/environment/class_environment.inc

index 9ea1e0ef94f707eecf9ed7effe14ae3ea838dc04..9ea00d0ffdf8b9b21e5677c38263cdc46de4e46e 100644 (file)
@@ -782,7 +782,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);
   }
 
@@ -961,7 +960,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)*/
@@ -971,6 +976,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