Code

Updated FAI partition handling.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 10 Aug 2009 11:20:33 +0000 (11:20 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 10 Aug 2009 11:20:33 +0000 (11:20 +0000)
-Skip 'count' index for diskOptions.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14028 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc

index c3ce94500248ec84b4b9a06c0d8d6debeae6611c..f21e5e0127cc082ed513c5b68676dd8e2683fcb2 100644 (file)
@@ -53,7 +53,14 @@ class faiPartitionTable extends plugin
         } else {
           $objects['FAIdiskType']        = $obj['FAIdiskType'];
         }
-        $objects['FAIdiskOption']        = $obj['FAIdiskOption'];
+
+        // Get disk options, without 'count' index. 
+        $objects['FAIdiskOption'] = array();
+        if (isset($obj['FAIdiskOption'])){
+          for($i=0;$i<$obj['FAIdiskOption']['count'];$i++){ 
+            $objects['FAIdiskOption'][] = $obj['FAIdiskOption'][$i];
+          }
+        }
 
         // Transform potential lvm information
         if (isset($obj['FAIlvmDevice'])){