Backport Bug in free/busy request handling (#51) by Claudio Nicora (nicorac)

This commit is contained in:
nathangray 2018-12-20 09:24:29 -07:00
parent 36307f9c2e
commit a1428d9f21
2 changed files with 6 additions and 7 deletions

View File

@ -871,10 +871,10 @@ class calendar_groupdav extends Api\CalDAV\Handler
{
trim($attribute);
list($key, $value) = explode('=', $attribute);
switch (strtolower($key))
switch (strtolower(trim($key)))
{
case 'charset':
$charset = strtoupper(substr($value,1,-1));
$charset = strtoupper(trim($value));
}
}
}
@ -1078,12 +1078,11 @@ class calendar_groupdav extends Api\CalDAV\Handler
array_shift($content_type);
foreach ($content_type as $attribute)
{
trim($attribute);
list($key, $value) = explode('=', $attribute);
switch (strtolower($key))
switch (strtolower(trim($key)))
{
case 'charset':
$charset = strtoupper(substr($value,1,-1));
$charset = strtoupper(trim($value));
}
}
}

View File

@ -3461,9 +3461,9 @@ class calendar_ical extends calendar_boupdate
// sort by start datetime
uasort($events, function($a, $b)
{
$diff = $a['start'] < $b['start'];
$diff = $a['start'] - $b['start'];
return !$diff ? 0 : ($diff < 0 ? -1 : 1);
return $diff == 0 ? 0 : ($diff < 0 ? -1 : 1);
});
$fbdata = array();