Code

Followup commit for r13694
authorpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 7 Jul 2009 08:51:45 +0000 (08:51 +0000)
committerpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 7 Jul 2009 08:51:45 +0000 (08:51 +0000)
- Make delete functionality properly handle the new array
  with numeric indices

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13898 594d385d-05f5-0310-b6e9-bd551577e9d8

trunk/gosa-plugins/fai/admin/fai/class_faiProfile.inc

index 1faedc2f26ee7999d1d60ff11c8cad9781c052c4..7ffb7b9b528c597dd87d81ef65788164bf924a77 100644 (file)
@@ -227,7 +227,12 @@ class faiProfile extends plugin
       }
 
       if($s_action == "delete" && $this->acl_is_writeable("FAIclass")){
-        unset($this->FAIclasses[$s_entry]);
+        foreach($this->FAIclasses as $key => $name) {
+          if ($name == $s_entry) {
+            unset($this->FAIclasses[$key]);
+            break;
+          }
+        }
       }
 
       if($s_action == "add" && $this->acl_is_writeable("FAIclass")){