[Tickets #9728] Re: hook prefs_init

bugs at horde.org bugs at horde.org
Tue Mar 29 19:55:38 UTC 2011


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/9728
------------------------------------------------------------------------------
  Ticket             | 9728
  Updated By         | rsalmon at mbpgroup.com
  Summary            | hook prefs_init
  Queue              | Turba
  Version            | Git master
  Type               | Bug
  State              | Feedback
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             | Michael Rubinsky
------------------------------------------------------------------------------


rsalmon at mbpgroup.com (2011-03-29 19:55) wrote:

> ok. I think there is some confusion here.  You say that you are  
> setting the default_dir pref, right?  That pref only sets the value  
> that specifies what address book is used for adding/importing  
> contacts.  The setting that specifies what address books are  
> *visible* is the "addressbooks" pref. Two different prefs.

Agreed, my issue can get confusing at some point. Two different prefs,  
but same issue, default_dir doesn't not set automatically using  
provided example (ie default_dir is set to null).

> Also, the hook you posted does not contain the code I specified to  
> you earlier that would be necessary to ensure the localsql source  
> was properly initialized, this is why it is failing to find the  
> default share, it hasn't been added to the cfgSources array yet. You  
> need to run the sources through Turba::getConfigFromShares() as I  
> mentioned on the mailing list (and you seem to have said you used in  
> an earlier comment).
I am not following you there. If I open the file hooks.php attached to  
this ticket, I can clearly see a hook for 'addressbooks' using  
getConfigFromShares :

     return  
json_encode(array_keys(Turba::getConfigFromShares(Turba::availableSources())));

this is indeed inspired from our discussion on the mailing list.


More testing on hook for pref 'default_dir', the follwowing always  
return false in turba/config/hooks.php
$GLOBALS['session']->get('turba', 'has_share')







More information about the bugs mailing list