Code

Updated sudo saving
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 7 Apr 2008 08:40:26 +0000 (08:40 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 7 Apr 2008 08:40:26 +0000 (08:40 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10223 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc

index 16e0c5b5e04003b6261c7e11a91557fc3174820d..f5bd1f2a12e985dc165b45b256cee07765117ae5 100644 (file)
@@ -298,7 +298,14 @@ class sudo extends plugin
    */
   function save()
   {
-    plugin::save(); 
+    plugin::save();
+   
+    /* Ensure a correct array index 
+     */ 
+    $this->attrs['sudoHost']    = array_values($this->attrs['sudoHost']);
+    $this->attrs['sudoRunas']   = array_values($this->attrs['sudoRunas']);
+    $this->attrs['sudoUser']    = array_values($this->attrs['sudoUser']);
+    $this->attrs['sudoCommand'] = array_values($this->attrs['sudoCommand']);
     $this->cleanup();
 
     $ldap = $this->config->get_ldap_link();