From 2c7c2964cdb06202b918d108b0333d0dc5ea46a3 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Thu, 15 Apr 2010 14:55:38 +0200 Subject: [PATCH] We want to filter for calendars here, not users. --- kronolith/lib/Tagger.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) 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 */ -- 2.11.0