/** * Synchronizes events and loads them. * * @see database_driver::load_events() */ public function load_events($start, $end, $query = null, $cal_ids = null, $virtual = 1, $modifiedsince = null, $force = false) { foreach ($this->sync_clients as $cal_id => $cal_sync) { if ($this->calendars[$cal_id]['active']) { if ($force || !$this->_is_synced($cal_id)) { $this->_sync_calendar($cal_id); } } } if ($force) { return true; } else { $events = parent::load_events($start, $end, $query, $cal_ids, $virtual, $modifiedsince); $return = array(); foreach ($events as $idx => $event) { $return[$idx] = $event; $return[$idx]['readonly'] = $this->readonly; } return $return; } }
/** * Synchronizes events and loads them. * * @see database_driver::load_events() */ public function load_events($start, $end, $query = null, $cal_ids = null, $virtual = 1, $modifiedsince = null, $force = false) { foreach ($this->sync_clients as $cal_id => $cal_sync) { if ($this->calendars[$cal_id]['active']) { if ($force || !$this->_is_synced($cal_id)) { $this->_sync_calendar($cal_id, $force); } } } if ($force) { return true; } else { return parent::load_events($start, $end, $query, $cal_ids, $virtual, $modifiedsince); } }