From eadd44489e5a2ad78a04d7c8c331b4a7b888376c Mon Sep 17 00:00:00 2001 From: psc Date: Mon, 13 Jul 2009 08:48:09 +0000 Subject: [PATCH] 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 --- trunk/gosa-plugins/fai/admin/fai/class_faiProfile.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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")){ -- 2.30.2