From: hickert Date: Tue, 20 May 2008 09:06:26 +0000 (+0000) Subject: Updated goto, skip entries which are on the remove queue X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4504721269ad5d511008d0bb54d6cfbb4f13b359;p=gosa.git Updated goto, skip entries which are on the remove queue git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10965 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/addons/goto/class_gotomasses.inc b/gosa-plugins/goto/addons/goto/class_gotomasses.inc index b7f0e6ef7..316526699 100644 --- a/gosa-plugins/goto/addons/goto/class_gotomasses.inc +++ b/gosa-plugins/goto/addons/goto/class_gotomasses.inc @@ -45,6 +45,8 @@ class gotomasses extends plugin var $range = 25; var $start = 0; + var $recently_removed = array(); + function gotomasses(&$config, $dn= NULL) { /* Include config object */ @@ -681,6 +683,8 @@ class gotomasses extends plugin $tmp = new DaemonEvent_faireboot($this->config); $tmp->add_targets($update_ids); $tmp->set_type(TRIGGERED_EVENT); + $this->recently_removed = $update_ids; + if(!$this->o_queue->append($tmp)){ msg_dialog::display(_("Error"), sprintf(_("Cannot update queue entry: %s"),$id) , ERROR_DIALOG); return(FALSE); @@ -771,8 +775,14 @@ class gotomasses extends plugin $this->entries = array(); foreach($entries as $entry){ + + /* Skip entries which will be removed within the next seconds */ + if(isset($entry['MACADDRESS']) && in_array($entry['MACADDRESS'],$this->recently_removed)){ + continue; + } $this->entries[$entry['ID']]= $entry; } + $this->recently_removed = array(); }