summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 78b00a9)
raw | patch | inline | side by side (parent: 78b00a9)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 12 Jan 2006 08:42:57 +0000 (08:42 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 12 Jan 2006 08:42:57 +0000 (08:42 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2454 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_printerPPDDialog.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_printerPPDDialog.inc b/plugins/admin/systems/class_printerPPDDialog.inc
index 516f95ad0ca8a086ab093dca5d996d459426a1bb..2f0c18f9db0913411bafb808f641e76c9495ed3f 100644 (file)
if(isset($_SESSION['config']->data['MAIN']['PPD_PATH'])){
$this->pathToPPD = $_SESSION['config']->data['MAIN']['PPD_PATH'];
- $this->pathToPPD= preg_replace("/\/*$/", "/", $this->pathToPPD);
+ $this->pathToPPD= preg_replace("/\/\//", "/", $this->pathToPPD);
}else{
$this->pathToPPD = "";
}
$tmp3['link'] =$ppdname;
$tmp3['ppd'] =$res;
- print_a($tmp3);
-
$this->selectedPPD = $tmp3;
$this->getPrinterReload();
}
$hit = true;
}
}
- }
- $this->selectedPPD['link'] = $_GET['id'];
- $this->ppdConfig = false;
+ }
+ if($hit == true){
+ $this->selectedPPD['link'] = str_replace($this->pathToPPD,"",$_GET['id']);
+ $this->ppdConfig = false;
+ }
unset($this->dialog);
$this->dialog=NULL;
+
}
/* if a dialog is open, print the dialog instead of this class
}
function save_ppd(){
- $this->ppdManager->saveProperties($this->pathToPPD.$this->selectedPPD['link'],$this->ppdConfig);
+ if($this->ppdManager){
+ $this->ppdManager->saveProperties($this->pathToPPD.$this->selectedPPD['link'],$this->ppdConfig);
+ }
}
/* Save to LDAP */
*/
$str = "none";
if(!empty($this->selectedPPD)){
- $str = $this->ppdManager->loadDescription($this->pathToPPD.$this->selectedPPD['link']);
+ $str = $this->ppdManager->loadDescription($this->pathToPPD."/".$this->selectedPPD['link']);
}
return($str) ;
}