[dev] turba-git hooks

Ronan SALMON rsalmon at mbpgroup.com
Tue Mar 22 09:21:32 UTC 2011


Hi all,

I have 3 backends enabled : localsql, localldap, favourites

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)
{
     switch ($pref) {
     case 'addressbooks':
         return json_encode(array_keys(Turba::availableSources()));
     }
}

This returns the 3 backends just fine, but when I login and go to  
turba's preferences, the 'localsql' backend is never in the selected  
group.

Ronan.



More information about the dev mailing list