6.0.0-alpha14
7/2/25

[#3701] custom hook support for backend selection
Summary custom hook support for backend selection
Queue Ingo
Queue Version 1.1
Type Enhancement
State Rejected
Priority 1. Low
Owners
Requester srrafa (at) usc (dot) es
Created 03/28/2006 (7036 days ago)
Due
Updated 12/30/2010 (5298 days ago)
Assigned 04/26/2006 (7007 days ago)
Resolved 05/26/2006 (6977 days ago)
Milestone
Patch Yes

History
12/30/2010 08:38:14 AM rafael (dot) varela (at) usc (dot) es Comment #13 Reply to this comment
Just for the record, our solution, based on Chuck's suggestions, is 
discussed here:

http://lists.horde.org/archives/ingo/Week-of-Mon-20070528/001345.html

Se also:

http://wiki.horde.org/IngoMulti
05/26/2006 03:43:14 AM Chuck Hagenbuch Comment #12
State ⇒ Rejected
Reply to this comment
I think that sometimes we forget it, too. :)
05/25/2006 08:35:22 PM srrafa (at) usc (dot) es Comment #11 Reply to this comment
Thanks for the tip. I will try it. I forget that the config files are 
php files too,  so they allow this degree of flexibility.
05/24/2006 08:38:35 PM Chuck Hagenbuch Comment #10 Reply to this comment
Instead of using hooks, or the preferred method, and instead of 
defining all 3 backends in backends.php, use your hooks code right in 
backends.php to figure out which backend the user belongs to, then 
define only that one.
05/24/2006 07:46:02 PM srrafa (at) usc (dot) es Comment #9 Reply to this comment
Sorry if I was unclear - new features should always be against HEAD,
not a release version (see http://horde.org/source/contribute.php),
so that's what I was applying it against.
Ok. Sorry for that. I use to work on stable releases to get the 
patches working on our production system as fast as possible.



I'll modify it using a CVS checkout if you finally find this patch useful.
What about my question on why this is necessary?
Well, getBackend() in lib/Ingo.php selects the backend wich its 
'preferred' field equals $_SERVER['SERVER_NAME'] or 
$_SERVER['HTTP_HOST']



In our University we have only one URL to access the webmail system 
but three different IMAPservers wich need different backends (procmail 
and sieve, the 3rd server is Exchange), so the unpatched system always 
uses the same backend.



Currently, I have no idea on how to achieve this using backends.php
05/24/2006 01:57:22 PM Chuck Hagenbuch Comment #8 Reply to this comment
Sorry if I was unclear - new features should always be against HEAD, 
not a release version (see http://horde.org/source/contribute.php), so 
that's what I was applying it against.



What about my question on why this is necessary?
05/24/2006 12:51:45 PM srrafa (at) usc (dot) es Comment #7 Reply to this comment
The patch to Ingo.php does not apply for me.
I've just downloaded back the patch and a fresh copy of Ingo-h3-1.1.1 
from ftp.horde.org and it applies without errors to both files.
05/24/2006 05:56:14 AM Chuck Hagenbuch Comment #6
Taken from Horde DevelopersHorde Developers
State ⇒ Feedback
Reply to this comment
The patch to Ingo.php does not apply for me.



Also, is this really something that can't be done inside the 
backends.php config file?
04/26/2006 11:02:03 AM Jan Schneider State ⇒ Assigned
 
04/25/2006 10:54:55 AM srrafa (at) usc (dot) es Comment #5
New Attachment: ingo.patch.tgz Download
Reply to this comment
Here's the updated version of the patch with the requested changes.



I've opened an enhancement ticket  for the passwd module to implement   
a similar functionality (see ticket #3821)



I'll update it accordingly when we close all the pending issues with 
this ticket
04/24/2006 04:42:42 PM srrafa (at) usc (dot) es Comment #4
New Attachment: hooks.php.dist Download
Reply to this comment
Sure.

Here you have an example of the custom hook. I need a little more time 
to address the rest of the issues. I'll upload it tomorrow.
04/24/2006 01:14:03 PM Jan Schneider Comment #3
State ⇒ Feedback
Reply to this comment
Can you update your patch to use Horde::callHook() instead, use a 
different hook name (_ingo_hook_backend_select), and provide an 
example for horde/config/hooks.php.dist?
03/28/2006 12:47:37 PM Jan Schneider Comment #2
Assigned to Horde DevelopersHorde Developers
State ⇒ Assigned
Reply to this comment
Looks good.
03/28/2006 12:16:39 PM srrafa (at) usc (dot) es Comment #1
Priority ⇒ 1. Low
State ⇒ New
New Attachment: ingo-h3-1.1.patch.tgz Download
Queue ⇒ Ingo
Summary ⇒ custom hook support for backend selection
Type ⇒ Enhancement
Reply to this comment
The attached file contains two patches against ingo-h3-1.1



conf.xml.patch for config/conf.xml

Ingo.php.patch for lib/Ingo.php



They add suport for one custom hook for backend Selection 
(_ingo_hook_selectBackend)

Saved Queries