From 3439fc41599b584011ee407f76f1f1616f0807b0 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 2344054f4..cd0c1e94d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ CHANGELOG Roundcube Webmail - Add Preferences > Mailbox View > Main Options > Layout (#5829) - Password: Fix compatibility with PHP 7+ in cpanel_webmail driver (#5820) - Managesieve: Fix parsing dot-staffed lines in multiline text (#5838) +- Managesieve: Fix AM/PM suffix in vacation time selectors - Fix decoding non-ascii attachment names from TNEF attachments (#5646, #5799) - Fix uninitialized string offset in rcube_utils::bin2ascii() and make sure rcube_utils::random_bytes() result has always requested length (#5788) - Fix bug where HTML messages with @media styles could moddify style of page body (#5811) diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php index 027383161..76a286697 100644 --- a/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php +++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php @@ -405,8 +405,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 fc4d1c01c..d1f259b22 100644 --- a/plugins/managesieve/managesieve.js +++ b/plugins/managesieve/managesieve.js @@ -929,8 +929,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;