From c3df8915340f6db6e1f98fcd4d05867228247bad Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Tue, 28 Dec 2010 11:58:37 +0100 Subject: [PATCH] Catch fatal error if a task list has been added during the session that doesn't exist in the cached list yet. --- kronolith/lib/Kronolith.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kronolith/lib/Kronolith.php b/kronolith/lib/Kronolith.php index e8b400e3c..7f6b22d5a 100644 --- a/kronolith/lib/Kronolith.php +++ b/kronolith/lib/Kronolith.php @@ -205,9 +205,10 @@ class Kronolith continue; } foreach ($registry->tasks->listTasklists($my, Horde_Perms::SHOW) as $id => $tasklist) { - if (!empty($GLOBALS['conf']['share']['hidden']) && - $tasklist->get('owner') != $GLOBALS['registry']->getAuth() && - !in_array('tasks/' . $id, $GLOBALS['display_external_calendars'])) { + if (!isset($GLOBALS['all_external_calendars']['tasks/' . $id]) || + (!empty($GLOBALS['conf']['share']['hidden']) && + $tasklist->get('owner') != $GLOBALS['registry']->getAuth() && + !in_array('tasks/' . $id, $GLOBALS['display_external_calendars']))) { continue; } $owner = $GLOBALS['registry']->getAuth() && -- 2.11.0