Merge branch 'master' of ssh://git.kolabsys.com/git/roundcube
This commit is contained in:
commit
d0111b6e01
3 changed files with 9 additions and 7 deletions
|
@ -582,7 +582,7 @@ class calendar extends rcube_plugin
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Construct the ics file for exporting events to iCalendar format;
|
||||
*/
|
||||
function export_events()
|
||||
{
|
||||
|
@ -590,8 +590,8 @@ class calendar extends rcube_plugin
|
|||
$end = get_input_value('end', RCUBE_INPUT_GET);
|
||||
if (!$start) $start = mktime(0, 0, 0, 1, date('n'), date('Y')-1);
|
||||
if (!$end) $end = mktime(0, 0, 0, 31, 12, date('Y')+10);
|
||||
$events = $this->driver->load_events($start, $end, get_input_value('source', RCUBE_INPUT_GET));
|
||||
|
||||
$events = $this->driver->load_events($start, $end, null, get_input_value('source', RCUBE_INPUT_GET), 0);
|
||||
|
||||
header("Content-Type: text/calendar");
|
||||
header("Content-Disposition: inline; filename=calendar.ics");
|
||||
|
||||
|
|
|
@ -191,9 +191,10 @@ class kolab_calendar
|
|||
* @param integer Event's new start (unix timestamp)
|
||||
* @param integer Event's new end (unix timestamp)
|
||||
* @param string Search query (optional)
|
||||
* @param boolean Strip virtual events (optional)
|
||||
* @return array A list of event records
|
||||
*/
|
||||
public function list_events($start, $end, $search = null)
|
||||
public function list_events($start, $end, $search = null, $virtual = 1)
|
||||
{
|
||||
$this->_fetch_events();
|
||||
|
||||
|
@ -224,7 +225,7 @@ class kolab_calendar
|
|||
}
|
||||
|
||||
// resolve recurring events
|
||||
if ($event['recurrence']) {
|
||||
if ($event['recurrence'] && $virtual == 1) {
|
||||
$events = array_merge($events, $this->_get_recurring_events($event, $start, $end));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -505,9 +505,10 @@ class kolab_driver extends calendar_driver
|
|||
* @param integer Event's new end (unix timestamp)
|
||||
* @param string Search query (optional)
|
||||
* @param mixed List of calendar IDs to load events from (either as array or comma-separated string)
|
||||
* @param boolean Strip virtual events (optional)
|
||||
* @return array A list of event records
|
||||
*/
|
||||
public function load_events($start, $end, $search = null, $calendars = null)
|
||||
public function load_events($start, $end, $search = null, $calendars = null, $virtual = 1)
|
||||
{
|
||||
if ($calendars && is_string($calendars))
|
||||
$calendars = explode(',', $calendars);
|
||||
|
@ -517,7 +518,7 @@ class kolab_driver extends calendar_driver
|
|||
if ($calendars && !in_array($cid, $calendars))
|
||||
continue;
|
||||
|
||||
$events = array_merge($events, $this->calendars[$cid]->list_events($start, $end, $search));
|
||||
$events = array_merge($events, $this->calendars[$cid]->list_events($start, $end, $search, $virtual));
|
||||
}
|
||||
|
||||
return $events;
|
||||
|
|
Loading…
Add table
Reference in a new issue