When converting seconds to minutes set alarm to at least 1 minute

Otherwise alarms with seconds < 30 would be ignored.
This commit is contained in:
Aleksander Machniak 2015-01-23 06:51:37 -05:00
parent 5a3468ac13
commit 62b69dd961

View file

@ -435,7 +435,7 @@ class libcalendaring extends rcube_plugin
// convert seconds to minutes
if ($seg[2] == 'S') {
$seg[2] = 'M';
$seg[1] = round($seg[1]/60);
$seg[1] = max(1, round($seg[1]/60));
}
return array($seg[1], $m[1].$seg[2], $m[1].$seg[1].$seg[2], $m[1].$prefix.$seg[1].$seg[2]);