Code

Updated DAK keyring, keep detail status if list is refreshed
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 20 Jun 2008 09:51:36 +0000 (09:51 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 20 Jun 2008 09:51:36 +0000 (09:51 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11394 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/dak/addons/dak/class_dakkeyring.inc

index 921ac13c48576c41bf3b968a41c09411b38acf08..9901f34d3fb4f4c42f0ccbc67b9f65b544684559 100644 (file)
@@ -70,7 +70,21 @@ class dakkeyring extends plugin
    */
   private function refresh_list()
   {
-    $this->list =  DAK::list_keys($this->Servers[$this->selected_Server]['MAC']);
+    $details = array();
+    foreach($this->list as $entry){
+      if(isset($entry['DETAILS']) && $entry['DETAILS'] && isset($entry['ATTRIBUTES']['UID'])){
+        $details[] = $entry['ATTRIBUTES']['UID'];
+      }
+    }
+    
+    $tmp = DAK::list_keys($this->Servers[$this->selected_Server]['MAC']);
+    $this->list = array();
+    foreach($tmp as $entry){
+      if(isset($entry['ATTRIBUTES']['UID']) && in_array($entry['ATTRIBUTES']['UID'],$details)){
+        $entry['DETAILS'] = TRUE;
+      }
+      $this->list[] = $entry;
+    }
   }