summaryrefslogtreecommitdiff
path: root/lib/Kolab/FreeBusy/Config.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Kolab/FreeBusy/Config.php')
-rw-r--r--lib/Kolab/FreeBusy/Config.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Kolab/FreeBusy/Config.php b/lib/Kolab/FreeBusy/Config.php
index d80ef7f..205a438 100644
--- a/lib/Kolab/FreeBusy/Config.php
+++ b/lib/Kolab/FreeBusy/Config.php
@@ -48,13 +48,16 @@ class Config
private function load($inifile)
{
if ($raw = parse_ini_file($inifile, true)) {
+ $config['directories'] = array();
foreach ($raw as $section => $values) {
// check for known sections
if (in_array($section, array('httpauth','trustednetworks','log'))) {
$config[$section] = $values;
}
- else if (strpos($section, 'directory') === 0 || isset($values['fbsource'])){
- $config['directories'][] = $values;
+ else if (strpos($section, 'directory') === 0 || isset($values['fbsource'])) {
+ $sect = preg_replace('/^directory\s*/', '', $section);
+ $key = strlen($sect) ? $sect : count($config['directories']);
+ $config['directories'][$key] = $values;
}
}