X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fsystems%2Fclass_printerPPDSelectionDialog.inc;h=335c947b56f4d31e81322bb4f79b9b10e6cb28fe;hb=e646d1b091e3d40c67039125dae867faa6fdd402;hp=b8defa751acfd05d1e5c00f57d9e28a203282f10;hpb=bd1c41394b0315ee37f442e30b74e697ce8ec33a;p=gosa.git diff --git a/plugins/admin/systems/class_printerPPDSelectionDialog.inc b/plugins/admin/systems/class_printerPPDSelectionDialog.inc index b8defa751..335c947b5 100644 --- a/plugins/admin/systems/class_printerPPDSelectionDialog.inc +++ b/plugins/admin/systems/class_printerPPDSelectionDialog.inc @@ -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;'") )); } }