Code

Create a new numerated array of the items to delete, instead of merging
authorpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 26 Mar 2009 11:25:43 +0000 (11:25 +0000)
committerpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 26 Mar 2009 11:25:43 +0000 (11:25 +0000)
the arrays, because this overwrites existing entries,
due to the fact that the existing arrays have conflicting keys,
which leads to the situation, that array_merge discards the first added
record in favor of the last one (Trac #2269)

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

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

index dc7bac243abd6934baefd076afe959f6b55c2624..f48108b60e760cbac34d6a1800c835be5d684451 100644 (file)
@@ -365,7 +365,9 @@ class faiManagement extends plugin
         $ids = $this->list_get_selected_items();
         $to_delete = array();
         foreach($ids as $id){
-          $to_delete = array_merge($to_delete,$this->objects[$id]);
+          foreach($this->objects[$id] as $obj) {
+            array_push($to_delete, $obj);
+          }
         }
       }