Code

Fixed admin toggle
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 May 2006 06:09:35 +0000 (06:09 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 May 2006 06:09:35 +0000 (06:09 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3398 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/environment/class_environment.inc

index 8582fce965c8250a46502d7277ca46991ae6bf14..84d18ae86522cc65a10d3af7eae445744acb9f11 100644 (file)
@@ -650,11 +650,16 @@ class environment extends plugin
     }
 
     if((isset($_POST['gotoPrinterEdit']))&&(isset($_POST['gotoPrinterSel']))&&(!empty($_POST['gotoPrinterSel']))){
-      $printer = $_POST['gotoPrinterSel'];
-      if($this->gotoPrinter[$printer]['mode']=="user"){
-        $this->gotoPrinter[$printer]['mode']="admin";
-      }else{
-        $this->gotoPrinter[$printer]['mode']="user";
+
+
+      $printers = $_POST['gotoPrinterSel'];
+
+      foreach($printers as $printer){
+        if($this->gotoPrinter[$printer]['mode']=="user"){
+          $this->gotoPrinter[$printer]['mode']="admin";
+        }else{
+          $this->gotoPrinter[$printer]['mode']="user";
+        }
       }
     }