From: Jan Schneider Date: Thu, 15 Apr 2010 12:55:38 +0000 (+0200) Subject: We want to filter for calendars here, not users. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=2c7c2964cdb06202b918d108b0333d0dc5ea46a3;p=horde.git We want to filter for calendars here, not users. --- diff --git a/kronolith/lib/Tagger.php b/kronolith/lib/Tagger.php index c34d0ec82..1733d9369 100644 --- a/kronolith/lib/Tagger.php +++ b/kronolith/lib/Tagger.php @@ -183,29 +183,22 @@ class Kronolith_Tagger // @TODO: No way to get only the system shares the current // user can see? $calendars = $GLOBALS['kronolith_shares']->listSystemShares(); - $c = array(); + $args['calendarId'] = array(); foreach ($calendars as $name => $share) { if ($share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) { - $c[] = $name; + $args['calendarId'][] = $name; } } - $args['calendarId'] = $c; } else { // Items owned by specific user(s) $args['userId'] = $filter['user']; } } elseif (!empty($filter['calendar'])) { // Only events located in specific calendar(s) - $args['userId'] = array(); if (!is_array($filter['calendar'])) { $filter['calendar'] = array($filter['calendar']); } - foreach ($filter['calendar'] as $calendar) { - if ($GLOBALS['all_calendars'][$calendar]->get('owner')) { - $args['userId'][] = $GLOBALS['all_calendars'][$calendar]->get('owner'); - } - } - $args['userId'] = array_unique($args['userId']); + $args['calendarId'] = $filter['calendar']; } /* Add the tags to the search */