From f9151f6830656923345dfa3a791f2458f617ae0b Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Wed, 12 Jul 2017 12:37:50 +0200 Subject: [PATCH] Managesieve: Fix AM/PM suffix in vacation time selectors --- CHANGELOG | 1 + plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php | 4 ++-- plugins/managesieve/managesieve.js | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 84e151c0e..4c94ccca5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ CHANGELOG Roundcube Webmail - Don't ignore (global) userlogins/sendmail logging in per_user_logging mode - Enigma: Fix compatibility with assets_dir +- Managesieve: Fix AM/PM suffix in vacation time selectors - Fix bug where comment notation within style tag would cause the whole style to be ignored (#5747) - Fix bug where it wasn't possible to scroll folders list in Edge (#5750) - Fix addressbook searching by gender (#5757) diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php index 874110534..f20050dec 100644 --- a/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php +++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php @@ -395,8 +395,8 @@ class rcube_sieve_vacation extends rcube_sieve_engine } if ($date_extension) { - $time_from = new html_inputfield(array('name' => 'vacation_timefrom', 'id' => 'vacation_timefrom', 'size' => 6)); - $time_to = new html_inputfield(array('name' => 'vacation_timeto', 'id' => 'vacation_timeto', 'size' => 6)); + $time_from = new html_inputfield(array('name' => 'vacation_timefrom', 'id' => 'vacation_timefrom', 'size' => 7)); + $time_to = new html_inputfield(array('name' => 'vacation_timeto', 'id' => 'vacation_timeto', 'size' => 7)); $time_format = $this->rc->config->get('time_format', 'H:i'); $date_value = array(); diff --git a/plugins/managesieve/managesieve.js b/plugins/managesieve/managesieve.js index 117f01a5a..fc18f2cd2 100644 --- a/plugins/managesieve/managesieve.js +++ b/plugins/managesieve/managesieve.js @@ -870,8 +870,8 @@ function sieve_formattime(hour, minutes) for (i=0; i 12 ? 'am' : 'pm'; break; - case 'A': time += hour > 12 ? 'AM' : 'PM'; break; + case 'a': time += hour >= 12 ? 'pm' : 'am'; break; + case 'A': time += hour >= 12 ? 'PM' : 'AM'; break; case 'g': case 'h': h = hour == 0 ? 12 : hour > 12 ? hour - 12 : hour;