paul@1 | 1 | --- a/lib/Kolab/FreeBusy/Directory.php |
paul@1 | 2 | +++ b/lib/Kolab/FreeBusy/Directory.php |
paul@1 | 3 | @@ -53,7 +53,7 @@ |
paul@1 | 4 | $fbsource = $this->config['fbsource']; |
paul@1 | 5 | if ($source = Source::Factory($fbsource)) { |
paul@1 | 6 | // forward request to Source instance |
paul@1 | 7 | - if ($data = $source->getFreeBusyData($user, $extended)) { |
paul@1 | 8 | + if ($data = $source->getFreeBusyData($this->postprocessAttrib($user), $extended)) { |
paul@1 | 9 | // send data through the according format converter |
paul@1 | 10 | $converter = Format::factory($this->config['format']); |
paul@1 | 11 | $data = $converter->toVCalendar($data); |
paul@1 | 12 | @@ -66,4 +66,19 @@ |
paul@1 | 13 | return false; |
paul@1 | 14 | } |
paul@1 | 15 | |
paul@1 | 16 | + /** |
paul@1 | 17 | + * Modify attribute values according to config |
paul@1 | 18 | + */ |
paul@1 | 19 | + protected function postprocessAttrib($attrib) |
paul@1 | 20 | + { |
paul@1 | 21 | + if (!empty($this->config['lc_attributes'])) { |
paul@1 | 22 | + foreach ((array)$this->config['lc_attributes'] as $key) { |
paul@1 | 23 | + if (!empty($attrib[$key])) |
paul@1 | 24 | + $attrib[$key] = strtolower($attrib[$key]); |
paul@1 | 25 | + } |
paul@1 | 26 | + } |
paul@1 | 27 | + |
paul@1 | 28 | + return $attrib; |
paul@1 | 29 | + } |
paul@1 | 30 | + |
paul@1 | 31 | } |
paul@1 | 32 | \ No newline at end of file |