Code

Fixed hangup, if the selected ppd file wasn't readable anymore
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 3 Nov 2005 12:49:10 +0000 (12:49 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 3 Nov 2005 12:49:10 +0000 (12:49 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1819 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_printGeneric.inc

index 8c794ba4b64d11db22a0d047dedd6a1442b9e023..2ed5f19c9e1fb505637876dab96dd84c876a654a 100644 (file)
@@ -351,7 +351,11 @@ class printgeneric extends plugin
     require_once ("class_ppdManager.inc");
     $ppdManager= new ppdManager('/var/spool/ppd/');
     if(!empty($this->gotoPrinterPPD)){
-      $smarty->assign("driverInfo", $ppdManager->loadDescription($this->gotoPrinterPPD));
+      if((!file_exists($this->gotoPrinterPPD))){
+        $smarty->assign("driverInfo", "<b>".sprintf(_("Your currently selected PPD file '%s' doesn't exists."),$this->gotoPrinterPPD))."</b>";
+      }else{
+        $smarty->assign("driverInfo", $ppdManager->loadDescription($this->gotoPrinterPPD));
+      }
     }else{
       $smarty->assign("driverInfo", _("not defined"));
     }