Code

Fixed acls for system management
[gosa.git] / plugins / admin / systems / class_printerPPDSelectionDialog.inc
index b8defa751acfd05d1e5c00f57d9e28a203282f10..335c947b56f4d31e81322bb4f79b9b10e6cb28fe 100644 (file)
@@ -64,9 +64,15 @@ class printerPPDSelectionDialog extends plugin
         }
       }
     }
-  
     if((isset($_GET['act']))&&($_GET['act']=="open"))  {
-      $this->Vendor = $_GET['id'];
+      
+      if((!empty($_GET['id'])) && (!isset( $this->header[base64_decode($_GET['id'])]))){
+        print_red(sprintf(_("Selected vendor '%s' does not exists in our list of ppds."),base64_decode($_GET['id'])));      
+        $this->Vendor = ""; 
+      }else{
+        $this->Vendor = base64_decode($_GET['id']);
+      }
     }
 
     $div = new divSelectBox("printerPPDSelectionDialog");
@@ -80,17 +86,17 @@ class printerPPDSelectionDialog extends plugin
     if(empty($this->Vendor)){
       foreach($this-> header as $key => $entry){
         $div ->AddEntry (array(
-              array("string"=>sprintf($linkopen,$key,$key))
+              array("string"=>sprintf($linkopen,base64_encode($key),$key),"attach"=>"style='border-right:0px;'")
               ));
       }
     }else{
       $div ->AddEntry (array(
-            array("string"=>sprintf($linkopen,"",".. ["._("back")."]"))
+            array("string"=>sprintf($linkopen,"",".. ["._("back")."]"),"attach"=>"style='border-right:0px;'")
             ));
       foreach($list as $key => $ppd){
         if(preg_match("/^".$this->Vendor."/",$ppd['ppd'])){
           $div ->AddEntry (array(
-                array("string"=>sprintf($uselink,$key,$ppd['ppd']))
+                array("string"=>sprintf($uselink,base64_encode($key),$ppd['ppd']),"attach"=>"style='border-right:0px;'")
                 ));
         }
       }