6.0.0-beta1
7/4/25

[#10657] portal block does not list user defined rules
Summary portal block does not list user defined rules
Queue Ingo
Queue Version Git master
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester thpo+horde (at) dotrc (dot) de
Created 10/14/2011 (5012 days ago)
Due
Updated 04/05/2012 (4838 days ago)
Assigned 10/31/2011 (4995 days ago)
Resolved 04/05/2012 (4838 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
04/05/2012 09:39:45 AM Jan Schneider State ⇒ Not A Bug
 
11/03/2011 09:09:50 AM thpo+horde (at) dotrc (dot) de Comment #3 Reply to this comment
The patch doesn't apply, please upload a patch file, don't paste it. 
Also, the order of the rules doesn't seem to be the same on the 
overview page and the block. Inactive special rules are not 
displayed correctly. And finally, this is making the block rather 
confusing when you have large lists, so I'm not sure if it's a good 
idea at all to include non-special rules too.
See, it is confusing to me, to see those five special rules, of which 
only Spam is active for me. And then there are all those non-special 
(user defined) rules that I toggle regularly, which are not displayed.
Maybe a switch to turn this on might be a good solution for the portal block.
I will send you the patch, when we have agreed on something.
10/31/2011 06:36:50 PM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
The patch doesn't apply, please upload a patch file, don't paste it. 
Also, the order of the rules doesn't seem to be the same on the 
overview page and the block. Inactive special rules are not displayed 
correctly. And finally, this is making the block rather confusing when 
you have large lists, so I'm not sure if it's a good idea at all to 
include non-special rules too.
10/14/2011 10:10:46 AM thpo+horde (at) dotrc (dot) de Comment #1
Priority ⇒ 1. Low
Patch ⇒ No
Milestone ⇒
Queue ⇒ Ingo
Summary ⇒ portal block does not list user defined rules
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
the following patch adds the user rules to the portal block:

diff --git a/ingo/lib/Block/Overview.php b/ingo/lib/Block/Overview.php
index 9325986..e5b1fe5 100644
--- a/ingo/lib/Block/Overview.php
+++ b/ingo/lib/Block/Overview.php
@@ -34,7 +34,7 @@ class Ingo_Block_Overview extends Horde_Core_Block
          $html = '<!--a75c305b1c0a6022--><table width="100%" height="100%">';
          $html_pre = '<tr><td valign="top">';
          $html_post = '</td></tr>';
-        foreach ($filters->getFilterList() as $filter) {
+        foreach ($filters->getFilterList() as $rule_number => $filter) {
              if (!empty($filter['disable'])) {
                  $active = _("inactive");
              } else {
@@ -97,6 +97,13 @@ class Ingo_Block_Overview extends Horde_Core_Block
                          _("Spam Filter") . '</a> ' . $active . $html_post;
                  }
                  break;
+
+            default:
+               $editurl = 
Horde::url('rule.php')->copy()->add(array('edit' => $rule_number, 
'actionID' => 'rule_edit'));
+               $html .= $html_pre . '</td><td>' .
+                       Horde::link($editurl, sprintf(_("Edit %s"), 
$filter['name'])) .
+                       $filter['name'] . '</a> ' . $active . $html_post;
+                break;
              }

          }

Saved Queries