Code

Updated environment/kiosk error
[gosa.git] / gosa-plugins / goto / personal / environment / class_hotplugDialog.inc
index b3a20f8946e77eaece72c5f379abde401b6b6aea..32be0aaab46a72643b05c5fc01b44d89f6e2af61 100644 (file)
@@ -2,11 +2,6 @@
 
 class hotplugDialog extends plugin
 {
-  /* CLI vars */
-  var $cli_summary          = "Manage server basic objects";
-  var $cli_description      = "Some longer text\nfor help";
-  var $cli_parameters       = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
   /* attribute list for save action */
   var $hotplugDevices           = ""; 
   var $hotplugDeviceList        = array(); 
@@ -49,9 +44,9 @@ class hotplugDialog extends plugin
     $smarty->assign("depselectHot",$this->depselect);
     $smarty->assign("apply", apply_filter());
     $smarty->assign("alphabet", generate_alphabet());
-    $smarty->assign("search_image", get_template_path('images/search.png'));
-    $smarty->assign("tree_image", get_template_path('images/tree.png'));
-    $smarty->assign("launchimage", get_template_path('images/small_filter.png'));
+    $smarty->assign("search_image", get_template_path('images/lists/search.png'));
+    $smarty->assign("tree_image", get_template_path('images/lists/search-subtree.png'));
+    $smarty->assign("launchimage", get_template_path('images/lists/action.png'));
     $smarty->assign("deplist", $this->config->idepartments);
 
 
@@ -61,6 +56,16 @@ class hotplugDialog extends plugin
     return($display);
   }
 
+  function check(){
+    /* Call common method to give check the hook */
+    $message= plugin::check();
+
+    if(empty($_POST['hotplugName'])){
+      $message[] = _("Please select a hotplug device!");
+    }
+    return $message;
+  }
+
 
   /* Save to LDAP */
   function save()
@@ -69,6 +74,7 @@ class hotplugDialog extends plugin
     foreach($_POST['hotplugName'] as $name){
       $entries[$name] = $this->hotplugDeviceList[$name];
     }
+
     return $entries;
   }
 
@@ -104,6 +110,7 @@ class hotplugDialog extends plugin
         $this->hotplugDeviceList[$attr['cn'][0]]=$tmp2;
       }
     }
+    uksort($a_return,"strnatcasecmp");
     return($a_return);
   }
 }