diff options
author | Aleksander Machniak <machniak@kolabsys.com> | 2015-01-23 11:44:02 (GMT) |
---|---|---|
committer | Aleksander Machniak <machniak@kolabsys.com> | 2015-01-23 11:44:02 (GMT) |
commit | 5a3468ac13e55d793589ae833e7d9f4ccb30a54f (patch) | |
tree | e47da02370b162c8b13032e21bb2ff18c5755e1b /plugins/libcalendaring | |
parent | 7c565bff0cb64349ace42b021934ad4ee335b721 (diff) | |
download | roundcubemail-plugins-kolab-5a3468ac13e55d793589ae833e7d9f4ccb30a54f.tar.gz |
Convert seconds to minutes when parsing alarm values (#4287)
Diffstat (limited to 'plugins/libcalendaring')
-rw-r--r-- | plugins/libcalendaring/libcalendaring.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/libcalendaring/libcalendaring.php b/plugins/libcalendaring/libcalendaring.php index e33edbd..0f769b9 100644 --- a/plugins/libcalendaring/libcalendaring.php +++ b/plugins/libcalendaring/libcalendaring.php @@ -432,6 +432,12 @@ class libcalendaring extends rcube_plugin foreach ($m2 as $seg) { $prefix = $seg[2] == 'D' || $seg[2] == 'W' ? 'P' : 'PT'; if ($seg[1] > 0) { // ignore zero values + // convert seconds to minutes + if ($seg[2] == 'S') { + $seg[2] = 'M'; + $seg[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]); } } |