[kronolith] Default external calendar

Jan Schneider jan at horde.org
Tue Feb 14 13:51:10 UTC 2012


Zitat von Martin Hochreiter <linuxbox at wavenet.at>:

> Hi!
>
> As our mailserver is running its own Caldav calendar, I  try to give each
> user automatically its own calendar.
>
> Therefore I am fighting with kronolith/config/prefs.local.php:
>
>
> $_prefs['remote_cals'] = array(
>         'value' =>  
> 'a:1:{i:0;a:6:{s:4:"name";s:2:"FH";s:4:"desc";s:0:"";s:3:"url";s:86:"https://'.$GLOBALS['registry']->getAuth().':'.urlencode($GLOBALS['registry']->getAuthCredential('password')).'@XXXXX/api/dav/Calendars/Users/'.$GLOBALS['registry']->getAuth().'@XXXXX/Calendar";s:5:"color";s:7:"#14c1bb";s:4:"user";s:24:"";s:8:"password";s:24:"";}}'
> );
> $_prefs['display_remote_cals'] = array(
>         'value' =>  
> 'a:1:{i:0;s:86:"https://'.$GLOBALS['registry']->getAuth().':'.urlencode($GLOBALS['registry']->getAuthCredential('password')).'@XXXXX/api/dav/Calendars/Users/'.$GLOBALS['registry']->getAuth().'@XXXXX/Calendar";}'
> );
>
>
> The URL that i put together is correct - but I dont see any external  
> calendar.
> I copied the whole string out from the mysql table ( the entry was  
> manual added entry in kronolith webmail) before adding the variable  
> parts.
> - can somebody give me a hint how to solve that please?

You cannot simply replace strings in the value copied from the  
database, because it is a serialized hash. Using $registry in  
prefs.local.php is not a good idea either.
Instead you should create a preference hook that builds the hash, and  
return it serialized.

-- 
The Horde Project
http://www.horde.org/



More information about the kronolith mailing list