1.1 --- a/debian/patches/directory-lcattributes.diff Sat Aug 16 17:55:09 2014 +0200
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,32 +0,0 @@
1.4 ---- a/lib/Kolab/FreeBusy/Directory.php
1.5 -+++ b/lib/Kolab/FreeBusy/Directory.php
1.6 -@@ -53,7 +53,7 @@
1.7 - $fbsource = $this->config['fbsource'];
1.8 - if ($source = Source::Factory($fbsource)) {
1.9 - // forward request to Source instance
1.10 -- if ($data = $source->getFreeBusyData($user, $extended)) {
1.11 -+ if ($data = $source->getFreeBusyData($this->postprocessAttrib($user), $extended)) {
1.12 - // send data through the according format converter
1.13 - $converter = Format::factory($this->config['format']);
1.14 - $data = $converter->toVCalendar($data);
1.15 -@@ -66,4 +66,19 @@
1.16 - return false;
1.17 - }
1.18 -
1.19 -+ /**
1.20 -+ * Modify attribute values according to config
1.21 -+ */
1.22 -+ protected function postprocessAttrib($attrib)
1.23 -+ {
1.24 -+ if (!empty($this->config['lc_attributes'])) {
1.25 -+ foreach ((array)$this->config['lc_attributes'] as $key) {
1.26 -+ if (!empty($attrib[$key]))
1.27 -+ $attrib[$key] = strtolower($attrib[$key]);
1.28 -+ }
1.29 -+ }
1.30 -+
1.31 -+ return $attrib;
1.32 -+ }
1.33 -+
1.34 - }
1.35 -\ No newline at end of file