6.0.0-beta1
9/1/25

[#11231] Unable to use prefs_init on IMP preferences
Summary Unable to use prefs_init on IMP preferences
Queue IMP
Queue Version Git master
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester rui.carneiro (at) portugalmail (dot) net
Created 06/27/2012 (4814 days ago)
Due
Updated 06/28/2012 (4813 days ago)
Assigned
Resolved 06/28/2012 (4813 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
06/28/2012 05:44:07 PM Michael Slusarz Comment #5
State ⇒ Not A Bug
Reply to this comment
This is expected.  A null value makes it look like the preference does 
not exist to the UI code, so it doesn't bother to run the hook.
06/28/2012 08:54:18 AM rui (dot) carneiro (at) portugalmail (dot) net Comment #4 Reply to this comment
Works fine here.  Example prefs.local.php:

<?php
$_prefs['add_source']['hook'] = true;
That is exactly what I tried but only works for horde prefs. I tried 
with your master branch, any idea why this could be happening?
I found what was happening. If the pref value is null the hook will 
not be called, example:

$_prefs['add_source']['value'] = null;
$_prefs['add_source']['hook'] = true;

I don't know if this is an expected behaviour but changing the value 
to an empty string fixed my problem.
06/28/2012 07:05:23 AM rui (dot) carneiro (at) portugalmail (dot) net Comment #3 Reply to this comment
Works fine here.  Example prefs.local.php:

<?php
$_prefs['add_source']['hook'] = true;
That is exactly what I tried but only works for horde prefs. I tried 
with your master branch, any idea why this could be happening?
06/27/2012 09:00:48 PM Michael Slusarz Comment #2 Reply to this comment
Works fine here.  Example prefs.local.php:

<?php
$_prefs['add_source']['hook'] = true;
06/27/2012 05:26:50 PM rui (dot) carneiro (at) portugalmail (dot) net Comment #1
Priority ⇒ 1. Low
Patch ⇒ No
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ Unable to use prefs_init on IMP preferences
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
I was trying to use prefs_init hook for "add_source" and 
"search_source" prefs but the prefs_init hook never runs (I already 
have 'hook'=>true on those prefs)

I am doing the same for horde preferences without any problem.

PS: I tried to use #horde channel to confirm this bug but I got no response.


Saved Queries