From: psc Date: Mon, 13 Jul 2009 08:48:09 +0000 (+0000) Subject: Renumber $this->FAIclasses when deleting values. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=eadd44489e5a2ad78a04d7c8c331b4a7b888376c;p=gosa.git Renumber $this->FAIclasses when deleting values. Avoids problem with "ghost" entries. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13924 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/trunk/gosa-plugins/fai/admin/fai/class_faiProfile.inc b/trunk/gosa-plugins/fai/admin/fai/class_faiProfile.inc index 0e46f71d5..3daa2424d 100644 --- a/trunk/gosa-plugins/fai/admin/fai/class_faiProfile.inc +++ b/trunk/gosa-plugins/fai/admin/fai/class_faiProfile.inc @@ -237,12 +237,13 @@ class faiProfile extends plugin } if($s_action == "delete" && $this->acl_is_writeable("FAIclass")){ + $newfaiclasses = array(); foreach($this->FAIclasses as $key => $name) { - if ($name == $s_entry) { - unset($this->FAIclasses[$key]); - break; + if ($name != $s_entry) { + array_push($newfaiclasses, $name); } } + $this->FAIclasses = $newfaiclasses; } if($s_action == "add" && $this->acl_is_writeable("FAIclass")){