Code

Unified with the printer dialog...
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 28 Mar 2008 14:14:53 +0000 (14:14 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 28 Mar 2008 14:14:53 +0000 (14:14 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10059 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/personal/environment/class_hotplugDialog.inc

index 50e57194118ad639d44fef2c4c82fd968b5b1b36..6ff644914c59ade2c27ddd6fa8392aef14552095 100644 (file)
@@ -56,15 +56,23 @@ class hotplugDialog extends plugin
     return($display);
   }
 
+  function check(){
+    /* Call common method to give check the hook */
+    $message= plugin::check();
+
+    if(empty($_POST['hostplugName'])){
+      $message[] = _("Please select a hotplug device!");
+    }
+    return $message;
+  }
+
 
   /* Save to LDAP */
   function save()
   {
     $entries = array();
-    if (isset($_POST['hotplugName'])){
-      foreach($_POST['hotplugName'] as $name){
-        $entries[$name] = $this->hotplugDeviceList[$name];
-      }
+    foreach($_POST['hotplugName'] as $name){
+      $entries[$name] = $this->hotplugDeviceList[$name];
     }
 
     return $entries;