* @param boolean $hideExceptions Hide events that represent exceptions to
* a recurring event (events with baseid
* set)?
+ * @param boolean $coverDates Add multi-day events to all dates?
*
* @return array A list of event hashes.
* @throws Kronolith_Exception
*/
public function listEvents($startstamp = null, $endstamp = null,
$calendars = null, $showRecurrence = true,
- $alarmsOnly = false, $showRemote = true, $hideExceptions = false)
+ $alarmsOnly = false, $showRemote = true, $hideExceptions = false,
+ $coverDates = true)
{
if (!isset($calendars)) {
$calendars = array($GLOBALS['prefs']->getValue('default_share'));
$showRecurrence,
$alarmsOnly,
$showRemote,
- $hideExceptions);
+ $hideExceptions,
+ $coverDates);
}
/**
if ($calendar) {
$driver = explode('|', $calendar, 2);
$calendars = array($driver[0] => array($driver[1]));
+ } elseif (!empty($query->calendars)) {
+ $calendars = $query->calendars;
} else {
$calendars = array(
Horde_String::ucfirst($GLOBALS['conf']['calendar']['driver']) => $GLOBALS['display_calendars'],
public static function listEvents($startDate, $endDate, $calendars = null,
$showRecurrence = true,
$alarmsOnly = false, $showRemote = true,
- $hideExceptions = false)
+ $hideExceptions = false, $coverDates = true)
{
$results = array();
foreach ($calendars as $calendar) {
$driver->open($calendar);
$events = $driver->listEvents($startDate, $endDate, $showRecurrence,
- $alarmsOnly, false, true,
+ $alarmsOnly, false, $coverDates,
$hideExceptions);
self::mergeEvents($results, $events);