X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=trunk%2Fgosa-plugins%2Fgoto%2Faddons%2Fgoto%2Fevents%2Fclass_DaemonEvent.inc;h=6268d9c0eb24fd1fffe0f5a875b0ecbeb58da89a;hb=457206279475e00123f90e2ee3c679cc352f9844;hp=b163d1b0552aff03fe479d7fa38caf4b1677b736;hpb=4fac2f62ffd64b76ed881700aa3932f07a6b020b;p=gosa.git diff --git a/trunk/gosa-plugins/goto/addons/goto/events/class_DaemonEvent.inc b/trunk/gosa-plugins/goto/addons/goto/events/class_DaemonEvent.inc index b163d1b05..6268d9c0e 100644 --- a/trunk/gosa-plugins/goto/addons/goto/events/class_DaemonEvent.inc +++ b/trunk/gosa-plugins/goto/addons/goto/events/class_DaemonEvent.inc @@ -51,7 +51,9 @@ class DaemonEvent protected $s_Schedule_Action = ""; // The deamon command name when newly created. (e.g. job_trigger_action_halt) protected $s_Trigger_Action= ""; // The deamon command name when edited. (e.g. trigger_action_halt) protected $s_Queued_Action= ""; // The deamon command name when edited. (e.g. trigger_action_halt) - protected $timestamp = 0; // Event execution time; + public $timestamp = 0; // Event execution time; + public $time_offset = 0; // An offset when an event should start (normally not used) + public $concurrent_operations = 1; // Number of concurrent operations when a timestamp offset is used protected $id = -1; // The Table ID protected $status = "unknown";// The current event status protected $is_new = TRUE; // Is TRUE if this is a new event @@ -70,6 +72,12 @@ class DaemonEvent protected $visible_for = HIDDEN_EVENT; protected $attributes = array("timestamp"); + + protected $time_offset_used = FALSE; + + /* Indicate that multiple events have to be created from this event */ + public $multiple_events = FALSE; + function set_type($type) { @@ -154,11 +162,33 @@ class DaemonEvent } + public function get_time_offset_select() + { + $this->time_offset_used = TRUE; + $smarty = get_smarty(); + + $opts_minutes = array(); + $opts_operations = array(); + foreach(range(0,120) as $i) { + $opts_minutes[$i] = $i; + } + foreach(range(1,100) as $i) { + $opts_operations[$i] = $i; + } + + $smarty->assign('offset_minutes', $opts_minutes); + $smarty->assign('offset_operations', $opts_operations); + $smarty->assign('time_offset', $this->time_offset); + $smarty->assign('concurrent_operations', $this->concurrent_operations); + return($smarty->fetch(get_template_path('time_offset.tpl', TRUE, dirname(__FILE__)))); + } + /*! \brief Returns HTML representation of a timestamp using