Code

Updated faiManagement
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Jan 2010 15:56:33 +0000 (15:56 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Jan 2010 15:56:33 +0000 (15:56 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15061 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index d1b2868f6dc56901e47115ea84ba8666122b27be..af9eb1fcf1d31242e4cfc4c5fe1909f900465476 100644 (file)
@@ -79,16 +79,16 @@ class faiManagement extends management
   {
     $headpage = $this->getHeadpage();
     if(count($target) == 1){
-      foreach($headpage->entries as $entry){
-        if($entry['dn'] == $target[0]){
-          if(count($entry['GROUPS']) == 1){
-            $data = array_pop($entry['GROUPS']);
-            $type = $this->get_type($data);
-            management::editEntry('editEntry',array($data['dn']),array(),$type[0],$type[2],$type[1]);
-          }else{
-            $this->dialogObject = new faiGroupHandle($entry['GROUPS'],"edit");
-          }
-          break;
+      $entry = $headpage->getEntry($target[0]);
+      if($entry){
+        echo $target[0];
+        print_a($entry);
+        if(count($entry['GROUPS']) == 1){
+          $data = array_pop($entry['GROUPS']);
+          $type = $this->get_type($data);
+          management::editEntry('editEntry',array($data['dn']),array(),$type[0],$type[2],$type[1]);
+        }else{
+          $this->dialogObject = new faiGroupHandle($entry['GROUPS'],"edit");
         }
       }
     }