diff --git a/plugins/admin/systems/class_printerPPDSelectionDialog.inc b/plugins/admin/systems/class_printerPPDSelectionDialog.inc
index 76987219d0dc681fb70b700a2f8d2b94099c800b..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");
- $div ->SetHeight(400);
+ $div ->SetHeight(450);
$div ->SetSummary(_("Printer ppd selection."));
$linkopen = "<a href='?plug=".$_GET['plug']."&act=open&id=%s'>%s</a>";
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;'")
));
}
}