diff --git a/plugins/admin/systems/class_printerPPDDialog.inc b/plugins/admin/systems/class_printerPPDDialog.inc
index dc359d9fb7cbd9ec5e5ef5e50a7d5abc8dea262c..516f95ad0ca8a086ab093dca5d996d459426a1bb 100644 (file)
if(isset($_SESSION['config']->data['MAIN']['PPD_PATH'])){
$this->pathToPPD = $_SESSION['config']->data['MAIN']['PPD_PATH'];
if(isset($_SESSION['config']->data['MAIN']['PPD_PATH'])){
$this->pathToPPD = $_SESSION['config']->data['MAIN']['PPD_PATH'];
+ $this->pathToPPD= preg_replace("/\/*$/", "/", $this->pathToPPD);
}else{
$this->pathToPPD = "";
}
}else{
$this->pathToPPD = "";
}
}
}// Foreach
if(!$found){
}
}// Foreach
if(!$found){
+ $ppdname = $vendor."/".$vendor."-".preg_replace("/^[^ ]/","",str_replace("-","",$model)).".ppd";
$filename = $this->pathToPPD.$vendor."/".$vendor."-".preg_replace("/^[^ ]/","",str_replace("-","",$model)).".ppd";
$fp = @fopen($filename,"w+");
if(!$fp){
$filename = $this->pathToPPD.$vendor."/".$vendor."-".preg_replace("/^[^ ]/","",str_replace("-","",$model)).".ppd";
$fp = @fopen($filename,"w+");
if(!$fp){
$tmp2= split("\n", $res);
$tmp3['name'] =preg_replace("/^ -/","",$tmp2[1]);
$tmp2= split("\n", $res);
$tmp3['name'] =preg_replace("/^ -/","",$tmp2[1]);
- $tmp3['link'] =$filename;
+ $tmp3['link'] =$ppdname;
$tmp3['ppd'] =$res;
$tmp3['ppd'] =$res;
+
+ print_a($tmp3);
+
$this->selectedPPD = $tmp3;
$this->getPrinterReload();
}
$this->selectedPPD = $tmp3;
$this->getPrinterReload();
}
}
}
}
}
+ /* Div Selection */
+ if((isset($_GET['act']))&&($_GET['act']=="use")){
+ $hit = false;
+ foreach($this->ppdList as $vendor => $ppds ){
+ foreach($ppds as $name => $ppd){
+ if($ppd['link']==$_GET['id']){
+ $hit = true;
+ }
+ }
+ }
+ $this->selectedPPD['link'] = $_GET['id'];
+ $this->ppdConfig = false;
+ unset($this->dialog);
+ $this->dialog=NULL;
+ }
+
/* if a dialog is open, print the dialog instead of this class
*/
if($this->dialog!=NULL){
/* if a dialog is open, print the dialog instead of this class
*/
if($this->dialog!=NULL){