[dev] Notes/Tasks don't show in Horde page

John Morrissey jwm at horde.net
Tue Jan 14 10:06:36 PST 2003


On Mon, Jan 13, 2003 at 05:49:44PM -0500, Chuck Hagenbuch wrote:
% Someone submitted patches to filter the categories that show up in your
% summary screen. The default is none.

Oops, that wasn't intended; if no categories are selected, I think the task
list should display all of them. Patch attached.

john
-- 
John Morrissey          _o            /\         ----  __o
jwm at horde.net        _-< \_          /  \       ----  <  \,
www.horde.net/    __(_)/_(_)________/    \_______(_) /_(_)__
-------------- next part --------------
Index: nag/lib/api.php
===================================================================
RCS file: /repository/nag/lib/api.php,v
retrieving revision 1.36
diff -u -u -r1.36 api.php
--- nag/lib/api.php	10 Jan 2003 19:57:43 -0000	1.36
+++ nag/lib/api.php	14 Jan 2003 15:00:12 -0000
@@ -72,15 +72,15 @@
     $html .= '</td></tr><tr><td class="summarytext"><table border="0" cellpadding="0" cellspacing="0" width="100%">';
 
     $summaryCategories = explode(';', $prefs->getValue('summary_categories'));
-    $categories = array();
     if ($summaryCategories != array('')) {
+        $categories = array();
         foreach ($summaryCategories as $summaryColumn) {
             list($categories[],) = explode(',', $summaryColumn);
         }
     }
 
     foreach (_nag_list() as $id => $task) {
-        if (!in_array($task['category'], $categories)) {
+        if (isset($categories) && !in_array($task['category'], $categories)) {
             continue;
         }
 
Index: mnemo/lib/api.php
===================================================================
RCS file: /repository/mnemo/lib/api.php,v
retrieving revision 1.13
diff -u -u -r1.13 api.php
--- mnemo/lib/api.php	10 Jan 2003 05:08:35 -0000	1.13
+++ mnemo/lib/api.php	14 Jan 2003 15:00:12 -0000
@@ -82,15 +82,15 @@
     $colors = Mnemo::categoryColors();
 
     $summaryCategories = explode(';', $prefs->getValue('summary_categories'));
-    $categories = array();
     if ($summaryCategories != array('')) {
+        $categories = array();
         foreach ($summaryCategories as $summaryColumn) {
             list($categories[],) = explode(',', $summaryColumn);
         }
     }
 
     foreach (_mnemo_list() as $id => $memo) {
-        if (!in_array($memo['category'], $categories)) {
+        if (isset($categories) && !in_array($memo['category'], $categories)) {
             continue;
         }
 


More information about the dev mailing list