Zitat von Vilius Šumskas <[email protected]>:
Vilius Šumskas <[email protected]> a écrit :
>> Zitat von Vilius ?umskas <[email protected]>:
>>
>> > Hello,
>> >
>> > add_source preference description reads:
>> >
>> > // Address book to use for adding addresses.
>> > // Put $cfgSources array element name in the value field.
>> > // Setting value to localsql would allow you to add contacts to
>> > MySQL database
>> > // See turba/config/sources.php for more info
>> >
>> > However with H4 this doesn't work anymore. I get "Unknown address
>> > book 'localsql'." every time I send an email. Also, when I re-save
>> > preferences trough GUI and look at MySQL database I see that the new
>> > add_source preference value goes like "NAkkIDxJBD9OMCV5CTiyKsA".
>> > What is the correct corresponding value for this preference under H4
>> > so I can put it to prefs.local.php for all new users?
>>
>> See the example hook.
>
> OK. I have enabled prefs_init hook in imp/config/hooks.php
>
> I have created imp/config/prefs.local.php with a content:
>
> $_prefs['add_source'] = array(
> 'value' => '',
> 'type' => 'enum',
> 'enum' => array(),
> 'hook' => true,
> 'desc' => _("Choose the address book to use when adding addresses.")
> );
>
> I still get the same message about unknown address book 'localsql'
> when sending email. Seems like
> $GLOBALS['registry']->call('contacts/getDefaultShare'); returns
> 'localsql' instead of share id.
try this :
prefs.local.php :
$_prefs['search_sources']['value'] = '';
$_prefs['search_sources']['locked'] = true;
$_prefs['search_sources']['hook'] = true;
$_prefs['search_fields']['value'] = '';
$_prefs['search_fields']['locked'] = true;
$_prefs['search_fields']['hook'] = true;
$_prefs['add_source']['value'] = '';
$_prefs['add_source']['locked'] = true;
$_prefs['add_source']['hook'] = true;
enable hooks using the provided examples for those 3 prefs and remove
the actual values in your prefs backend.
Still doesn't work. I have verified that 'localsql' value really
comes from $GLOBALS['registry']->call('contacts/getDefaultShare');
in a hook by adding "test" string in front of the call and get
'testlocalsql'. So the hook is working but doesn't return correct
value of the share id.
Then you probably have a wrong value for the default_dir pref in Turba too.
Jan.
--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
--
IMP mailing list
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]