[Tickets #9728] hook prefs_init
bugs at horde.org
bugs at horde.org
Mon Mar 28 09:36:33 UTC 2011
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/9728
------------------------------------------------------------------------------
Ticket | 9728
Created By | rsalmon at mbpgroup.com
Summary | hook prefs_init
Queue | Turba
Version | Git master
Type | Bug
State | Unconfirmed
Priority | 1. Low
Milestone |
Patch |
Owners |
+New Attachment | horde_debug.txt
------------------------------------------------------------------------------
rsalmon at mbpgroup.com (2011-03-28 09:36) wrote:
First, hook public function default_dir($username = null) should
probably be merged in a prefs_init function since hooks changed in
Horde.
Secondly,
I'm trying to setup a hook to automatically set pref 'addressbooks'.
So far, I've always been able to automatically set backends
'localldap' and 'favourites', but not backend 'localsql'.
Here is my hook :
public function prefs_init($pref, $value, $username, $scope_ob )
{
switch ($pref) {
case 'addressbooks':
$shares = Turba::listShares(true);
return
json_encode(array_keys(Turba::getConfigFromShares(Turba::availableSources())));
}
}
When I login I get a : addressbook 'localsql' does not exist.
I've added the following line right before the return call of
getConfigFromShares (turba/lib/Turba.php:523)
Attached is the output.
Looks like backend 'localsql' doesn't not get initialize properly
during login process.
More information about the bugs
mailing list