Page MenuHomePhorge

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