From 8e9cebd552a3420968353f9052a7f3bd4c8fad55 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 25 Oct 2007 13:57:18 +0000 Subject: [PATCH] Fixed printer errors git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7663 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_printGeneric.inc | 10 ++++++---- plugins/admin/systems/class_printerPPDDialog.inc | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index 9d3c2cfe2..04e78a407 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -717,10 +717,12 @@ class printgeneric extends plugin $this->PPDdialogToSave->save_ppd(); } if($this->orig_dn != $this->dn){ - $this->PPDdialogToSave = new printerPPDDialog($this->config, $this->dn,$this->gotoPrinterPPD); - $this->PPDdialogToSave->cn = $this->cn; - $this->PPDdialogToSave->generateProperties(); - $this->PPDdialogToSave->update_ppd_url(); + if(!empty($this->gotoPrinterPPD)) { + $this->PPDdialogToSave = new printerPPDDialog($this->config, $this->dn,$this->gotoPrinterPPD); + $this->PPDdialogToSave->cn = $this->cn; + $this->PPDdialogToSave->generateProperties(); + $this->PPDdialogToSave->update_ppd_url(); + } } /* Remove previously selected ppd file.*/ diff --git a/plugins/admin/systems/class_printerPPDDialog.inc b/plugins/admin/systems/class_printerPPDDialog.inc index 39e72923c..b2e8819c3 100644 --- a/plugins/admin/systems/class_printerPPDDialog.inc +++ b/plugins/admin/systems/class_printerPPDDialog.inc @@ -301,7 +301,7 @@ class printerPPDDialog extends plugin function getPrinterReload() { if(is_readable($this->pathToPPD)){ - $tmp = $this->ppdManager->getPrinterList(true); + $tmp = @$this->ppdManager->getPrinterList(true); $this->ppdListHeader = $this->ppdList = array(); -- 2.30.2