diff --git a/plugins/admin/systems/class_printerPPDSelectionDialog.inc b/plugins/admin/systems/class_printerPPDSelectionDialog.inc
index 1c949fb99ddf5015a3671e3ec3c9758595d244be..335c947b56f4d31e81322bb4f79b9b10e6cb28fe 100644 (file)
}
}
}
-
+
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");
if(empty($this->Vendor)){
foreach($this-> header as $key => $entry){
$div ->AddEntry (array(
- array("string"=>sprintf($linkopen,$key,$key),"attach"=>"style='border-right:0px;'")
+ array("string"=>sprintf($linkopen,base64_encode($key),$key),"attach"=>"style='border-right:0px;'")
));
}
}else{
foreach($list as $key => $ppd){
if(preg_match("/^".$this->Vendor."/",$ppd['ppd'])){
$div ->AddEntry (array(
- array("string"=>sprintf($uselink,$key,$ppd['ppd']),"attach"=>"style='border-right:0px;'")
+ array("string"=>sprintf($uselink,base64_encode($key),$ppd['ppd']),"attach"=>"style='border-right:0px;'")
));
}
}