6.0.0-beta1
7/3/25

[#10455] Cannot disable available filter rules using Sieve
Summary Cannot disable available filter rules using Sieve
Queue Ingo
Queue Version 2.0.4
Type Bug
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester jmDS (at) hampshire (dot) edu
Created 08/24/2011 (5062 days ago)
Due
Updated 08/26/2011 (5060 days ago)
Assigned
Resolved 08/26/2011 (5060 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
08/26/2011 08:25:55 AM Jan Schneider Comment #3
Assigned to Jan Schneider
State ⇒ Resolved
Reply to this comment
Fixed in Git already.
08/24/2011 07:39:55 PM jmDS (at) hampshire (dot) edu Comment #2
New Attachment: patch.txt Download
Reply to this comment

[Show Quoted Text - 20 lines]
Here's the patch.

08/24/2011 07:38:40 PM jmDS (at) hampshire (dot) edu Comment #1
Priority ⇒ 2. Medium
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Ingo
Summary ⇒ Cannot disable available filter rules using Sieve
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
I'm attempting to disable/remove all of the rules available by default 
in Ingo. In prefs.php, there are five preferences (one for each of 
whitelist, blacklist, forward, vacation, spam). Locking these is 
supposed to disable them and remove them from the filter list for the 
user.

However, locking all five preferences only removes 'whitelist' and 
'blacklist' from the filter list in Ingo. I believe that the reason 
for this is as follows:

This functionality is provided in lib/Ingo.php on lines 70-85. It 
creates an array called $categories. Then, for each of the five 
preferences above, it attempts to remove that option from the 
categories array. I believe the problem is that it's unsetting the 
element in the array whose position is, for example, 
Ingo_Storage::ACTION_BLACKLIST instead of the element in the array 
whose value is Ingo_Storage::ACTION_BLACKLIST.

On my Horde server, I replaced that code with the patch I've included, 
which produces the functionality I expect.

Saved Queries