summaryrefslogtreecommitdiff
path: root/lib/Kolab/FreeBusy/Directory.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Kolab/FreeBusy/Directory.php')
-rw-r--r--lib/Kolab/FreeBusy/Directory.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/Kolab/FreeBusy/Directory.php b/lib/Kolab/FreeBusy/Directory.php
index 97fee75..dba6014 100644
--- a/lib/Kolab/FreeBusy/Directory.php
+++ b/lib/Kolab/FreeBusy/Directory.php
@@ -53,7 +53,7 @@ abstract class Directory
$fbsource = $this->config['fbsource'];
if ($source = Source::Factory($fbsource)) {
// forward request to Source instance
- if ($data = $source->getFreeBusyData($user, $extended)) {
+ if ($data = $source->getFreeBusyData($this->postprocessAttrib($user), $extended)) {
// send data through the according format converter
$converter = Format::factory($this->config['format']);
$data = $converter->toVCalendar($data);
@@ -66,4 +66,19 @@ abstract class Directory
return false;
}
+ /**
+ * Modify attribute values according to config
+ */
+ protected function postprocessAttrib($attrib)
+ {
+ if (!empty($this->config['lc_attributes'])) {
+ foreach ((array)$this->config['lc_attributes'] as $key) {
+ if (!empty($attrib[$key]))
+ $attrib[$key] = strtolower($attrib[$key]);
+ }
+ }
+
+ return $attrib;
+ }
+
} \ No newline at end of file