Code

Added acls for printer glpi
[gosa.git] / plugins / admin / systems / class_printerPPDDialog.inc
index a7458d53edfacfe4bc1e9f0ef9a654384c7fd93e..9296afe61985cfcd1585baae1e9ef623dcdb16c7 100644 (file)
@@ -96,8 +96,7 @@ class printerPPDDialog extends plugin
       /* Check if path is write/readable*/
       $is_r = @is_readable($path);  
       if(((!is_dir($path))||(empty($path)) || (!$is_r)) && (!@mkdir($path))){
-        print_red(sprintf(_("The specified path '%s' which results from PPD_PATH in your gosa.conf is invalid,".
-                            " can't read/write any ppd informations."),$path));
+        print_red(sprintf(_("The specified path '%s' which results from PPD_PATH in your gosa.conf is invalid, can't read/write any ppd informations."),$path));
         /* Print out template */
         $display.= $smarty->fetch(get_template_path('printerPPDDialog.tpl', TRUE,dirname(__FILE__)));
         return($display);
@@ -479,7 +478,14 @@ class printerPPDDialog extends plugin
     return($str);
   }
   
-  function check(){  return(plugin::check()); }
+  function check()
+  {  
+    $message = plugin::check();
+    if(empty($this->selectedPPD['link'])){
+      $message[] = _("Please select a valid ppd file or use 'Cancel' to go back to printer configuration.");
+    }
+    return($message); 
+  }
 }
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>