- Add possibility to set global Horde config

This commit is contained in:
Aleksander Machniak 2011-06-01 10:18:44 +02:00
parent c51ba8d51d
commit 0bd3160968
2 changed files with 17 additions and 8 deletions

View file

@ -8,4 +8,7 @@ $rcmail_config['kolab']['ldap']['basedn'] = 'dc=kolabserver,dc=local';
$rcmail_config['kolab']['ldap']['phpdn'] = 'cn=nobody,cn=internal,dc=kolabserver,dc=local';
$rcmail_config['kolab']['ldap']['phppw'] = '<ldap-pwd-goes-here>';
// Global Horde classes configuration (e.g. Cache settings)
$rcmail_config['kolab']['global'] = array();
?>

View file

@ -39,6 +39,13 @@ class rcube_kolab
// load ldap credentials from local config
$conf['kolab'] = $rcmail->config->get('kolab');
// Set global Horde config (e.g. Cache settings)
if (!empty($conf['kolab']['global'])) {
$conf = array_merge($conf, $conf['kolab']['global']);
unset($conf['kolab']['global']);
}
// Re-set LDAP/IMAP host config
$conf['kolab']['ldap'] += array('server' => 'ldap://' . $_SESSION['imap_host'] . ':389');
$conf['kolab']['imap'] += array('server' => $_SESSION['imap_host'], 'port' => $_SESSION['imap_port']);
@ -59,7 +66,6 @@ class rcube_kolab
String::setDefaultCharset('UTF-8');
}
/**
* Get instance of a Kolab (XML) format object
*