Various issues when using dtstart/dtend in a request
Open, NormalPublic


As stated in parent task (T1245) there are various issues when using dtstart/dtend arguments in the request. It is:

  1. Fatal error
PHP Fatal error:  Class 'rcube_utils' not found in /usr/share/kolab-freebusy/lib/Kolab/FreeBusy/Utils.php on line 197
 PHP Stack trace:
 PHP   1. {main}() /usr/share/kolab-freebusy/public_html/index.php:0
 PHP   2. Kolab\\FreeBusy\\Utils::dummyVFreebusy() /usr/share/kolab-freebusy/public_html/index.php:110
 PHP   3. Kolab\\FreeBusy\\Utils::periodStart() /usr/share/kolab-freebusy/lib/Kolab/FreeBusy/Utils.php:253
 PHP   4. Kolab\\FreeBusy\\Utils::periodStartDT() /usr/share/kolab-freebusy/lib/Kolab/FreeBusy/Utils.php:181

This can be fixed by implementing replacement for Roundcube's anytodatetime() in Utils.php.

  1. Wrong conversion to unixtime. There is twice in Utils.php ->format('u'), while it should be ->format('U').
  2. Variable $user contains not only the user email but also request query with GET arguments here;92624e48b70a34b69c77a9cc016caf377868ee93$79, e.g. user@domain.tld?dtstart=XXXXXXX&dtend=YYYYYY. All after ? character need to be removed, otherwise other code can't find the user.
  3. Finally, when we fix all the above there's a problem with the cache. Freebusy caches only one dataset per user. So, e.g. if you ask for one month dataset, this month will be returned and saved into cache. If you then ask for another month the data from previous request will be returned.


Ticket Type

Event Timeline

machniak created this task.May 3 2016, 12:32 PM
tobru added a subscriber: tobru.Jun 30 2016, 5:41 PM
vanmeeuwen moved this task from Backlog to Reviewed on the Bug Reports board.Jul 13 2016, 11:54 AM

1-3 is fixed via merged D204.

pasik added a subscriber: pasik.Nov 25 2017, 2:39 PM
vanmeeuwen lowered the priority of this task from 60 to Normal.Mar 28 2019, 8:12 AM