Catch fatal error if a task list has been added during the session that doesn't
authorJan Schneider <jan@horde.org>
Tue, 28 Dec 2010 10:58:37 +0000 (11:58 +0100)
committerJan Schneider <jan@horde.org>
Tue, 28 Dec 2010 11:45:46 +0000 (12:45 +0100)
exist in the cached list yet.

kronolith/lib/Kronolith.php

index e8b400e..7f6b22d 100644 (file)
@@ -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() &&