Code

Fixed printer errors
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 25 Oct 2007 13:57:18 +0000 (13:57 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 25 Oct 2007 13:57:18 +0000 (13:57 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7663 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_printGeneric.inc
plugins/admin/systems/class_printerPPDDialog.inc

index 9d3c2cfe25ef6e524d4ccaacec09d0d064271f5e..04e78a4075812132f6ad893a9595128edba71ddc 100644 (file)
@@ -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.*/
index 39e72923cacead1b50a67d4d00d03a0391de517f..b2e8819c301b30eac5a76c7c7d46c70e98d997eb 100644 (file)
@@ -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();