add caldav to preinstalled_sources key & example config

This commit is contained in:
n-peugnet 2022-05-02 21:33:56 +02:00
parent 847aae1321
commit f679c616e8
2 changed files with 15 additions and 1 deletions

View file

@ -143,6 +143,20 @@ $config['kolab_invitation_calendars'] = false;
// %i - Calendar UUID
// $config['calendar_caldav_url'] = 'http://%h/iRony/calendars/%u/%i';
// List of CalDAV sources that should be allready installed.
// They will be added when the calendar section is accessed for the first time by a user.
// For 'caldav_user' and 'caldav_url' the following replacement variables are supported:
// %u - Current webmail user name
// For 'caldav_pass' %p is replaced by the current user's password.
// $config['calendar_caldav_preinstalled_sources'] = array(
// 'name' => array(
// 'caldav_user' => '%u',
// 'caldav_pass' => '%p',
// 'caldav_url' => 'https://example.net/dav',
// 'showAlarms' => 1
// )
// );
// Driver to provide a resource directory ('ldap' is the only implementation yet).
// Leave empty or commented to disable resources support.
// $config['calendar_resources_driver'] = 'ldap';

View file

@ -110,7 +110,7 @@ class caldav_driver extends calendar_driver
*/
protected function _setup_preinstalled_sources()
{
$preinstalled_sources = $this->rc->config->get('calendar_preinstalled_sources', FALSE);
$preinstalled_sources = $this->rc->config->get('calendar_caldav_preinstalled_sources', FALSE);
if ($preinstalled_sources && is_array($preinstalled_sources)) {
$username = $this->rc->get_user_name();
$password = $this->rc->get_user_password();