summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f7f871d)
raw | patch | inline | side by side (parent: f7f871d)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 12 Jan 2006 15:40:49 +0000 (15:40 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 12 Jan 2006 15:40:49 +0000 (15:40 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2471 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_printGeneric.inc | patch | blob | history | |
plugins/admin/systems/class_printerPPDDialog.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index a8843d920550ae492647e4e60614122cd63d7649..fc743ce969414ae6b89fe9511a60c69e73967518 100644 (file)
require_once ("class_ppdManager.inc");
if((isset($_SESSION['config']->data['MAIN']['PPD_PATH']))&&(is_dir($_SESSION['config']->data['MAIN']['PPD_PATH']))){
- $ppdManager= new ppdManager($_SESSION['config']->data['MAIN']['PPD_PATH']);
+
+ $path = $_SESSION['config']->data['MAIN']['PPD_PATH'];
+ if(!preg_match("/\/$/",$path)){
+ $path = $path."/";
+ }
+
+ $ppdManager= new ppdManager($path);
if(!empty($this->gotoPrinterPPD)){
- if((!file_exists($_SESSION['config']->data['MAIN']['PPD_PATH'].$this->gotoPrinterPPD))){
+ if((!file_exists($path.$this->gotoPrinterPPD))){
$smarty->assign("driverInfo", "<b>".sprintf(_("Your currently selected PPD file '%s' doesn't exist."),$this->gotoPrinterPPD))."</b>";
}else{
- $smarty->assign("driverInfo", $ppdManager->loadDescription($_SESSION['config']->data['MAIN']['PPD_PATH'].$this->gotoPrinterPPD));
+ $smarty->assign("driverInfo", $ppdManager->loadDescription($path.$this->gotoPrinterPPD));
}
}else{
$smarty->assign("driverInfo", _("not defined"));
diff --git a/plugins/admin/systems/class_printerPPDDialog.inc b/plugins/admin/systems/class_printerPPDDialog.inc
index 2f0c18f9db0913411bafb808f641e76c9495ed3f..f9f3ed2717412c8d9a8567df3639c8885488f3c4 100644 (file)
if(isset($_SESSION['config']->data['MAIN']['PPD_PATH'])){
$this->pathToPPD = $_SESSION['config']->data['MAIN']['PPD_PATH'];
$this->pathToPPD= preg_replace("/\/\//", "/", $this->pathToPPD);
+ if(!preg_match("/\/$/",$this->pathToPPD)){
+ $this->pathToPPD = $this->pathToPPD."/";
+ }
}else{
$this->pathToPPD = "";
}