[dev] Mnemo category selection

John Morrissey jwm at horde.net
Mon Feb 17 21:19:28 PST 2003


Mnemo's category selection support never made it into the portal view; patch
attached.

john
-- 
John Morrissey          _o            /\         ----  __o
jwm at horde.net        _-< \_          /  \       ----  <  \,
www.horde.net/    __(_)/_(_)________/    \_______(_) /_(_)__
-------------- next part --------------
Index: summary.php
===================================================================
RCS file: /repository/mnemo/lib/Block/summary.php,v
retrieving revision 1.2
diff -u -u -r1.2 summary.php
--- summary.php	28 Jan 2003 13:25:30 -0000	1.2
+++ summary.php	18 Feb 2003 02:17:17 -0000
@@ -41,8 +41,20 @@
         $html = '<table border="0" cellpadding="0" cellspacing="0" width="100%">';
         $colors = Mnemo::categoryColors();
 
+        $summaryCategories = explode(';', $prefs->getValue('summary_categories'));
+        if ($summaryCategories != array('')) {
+            $categories = array();
+            foreach ($summaryCategories as $summaryColumn) {
+                list($categories[],) = explode(',', $summaryColumn);
+            }
+        }
+
         $memos = _mnemo_list();
         foreach ($memos as $id => $memo) {
+            if (isset($categories) && !in_array($memo['category'], $categories)) {
+                continue;
+            }
+
             $html .= '  <tr>';
 
             if ($prefs->getValue('summary_show_colors')) {


More information about the dev mailing list