Description: Nag_Driver_Kolab: Correctly retrieve tasks from tasklists
Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Abstract:
 Add 1001_nag-kolab-correctly-retrieve-tasklists-regarding-completion-state.patch:
 .
 Without this patch, Nag is not able to render tasklists based
 on the completion or other flags.
 .   
 Nag task list tabs (when using the Kolab driver) always show all
 task, although they should show what the tab title says, e.g.
 "All tasks", "Incomplete tasks", "Future tasks", "Completed tasks".


Index: horde/nag/lib/Driver/Kolab.php
===================================================================
--- horde.orig/nag/lib/Driver/Kolab.php	2015-12-15 20:00:57.000000000 +0100
+++ horde/nag/lib/Driver/Kolab.php	2015-12-15 20:02:01.000000000 +0100
@@ -415,7 +415,7 @@
             switch ($completed) {
             case Nag::VIEW_INCOMPLETE:
                 if ($complete) {
-                    continue;
+                    continue 2;
                 }
                 if ($start && $t->recurs() &&
                     ($completions = $t->recurrence->getCompletions())) {
@@ -431,18 +431,18 @@
                         ->nextRecurrence($lastCompletion)
                         ->timestamp();
                     if ($start > $_SERVER['REQUEST_TIME']) {
-                        continue;
+                        continue 2;
                     }
                 }
                 break;
             case Nag::VIEW_COMPLETE:
                 if (!$complete) {
-                    continue;
+                    continue 2;
                 }
                 break;
             case Nag::VIEW_FUTURE:
                 if ($complete || $start == 0) {
-                    continue;
+                    continue 2;
                 }
                 if ($start && $t->recurs() &&
                     ($completions = $t->recurrence->getCompletions())) {
@@ -458,13 +458,13 @@
                         ->nextRecurrence($lastCompletion)
                         ->timestamp();
                     if ($start < $_SERVER['REQUEST_TIME']) {
-                        continue;
+                        continue 2;
                     }
                 }
                 break;
             case Nag::VIEW_FUTURE_INCOMPLETE:
                 if ($complete) {
-                    continue;
+                    continue 2;
                 }
                 break;
             }