Managesieve: Fix AM/PM suffix in vacation time selectors

pull/5890/head
Aleksander Machniak 7 years ago
parent f1228e7a8b
commit 3439fc4159

@ -5,6 +5,7 @@ CHANGELOG Roundcube Webmail
- Add Preferences > Mailbox View > Main Options > Layout (#5829) - Add Preferences > Mailbox View > Main Options > Layout (#5829)
- Password: Fix compatibility with PHP 7+ in cpanel_webmail driver (#5820) - Password: Fix compatibility with PHP 7+ in cpanel_webmail driver (#5820)
- Managesieve: Fix parsing dot-staffed lines in multiline text (#5838) - 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 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 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) - Fix bug where HTML messages with @media styles could moddify style of page body (#5811)

@ -405,8 +405,8 @@ class rcube_sieve_vacation extends rcube_sieve_engine
} }
if ($date_extension) { if ($date_extension) {
$time_from = new html_inputfield(array('name' => 'vacation_timefrom', 'id' => 'vacation_timefrom', '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' => 6)); $time_to = new html_inputfield(array('name' => 'vacation_timeto', 'id' => 'vacation_timeto', 'size' => 7));
$time_format = $this->rc->config->get('time_format', 'H:i'); $time_format = $this->rc->config->get('time_format', 'H:i');
$date_value = array(); $date_value = array();

@ -929,8 +929,8 @@ function sieve_formattime(hour, minutes)
for (i=0; i<format.length; i++) { for (i=0; i<format.length; i++) {
c = format.charAt(i); c = format.charAt(i);
switch (c) { switch (c) {
case 'a': time += hour > 12 ? 'am' : 'pm'; break; case 'a': time += hour >= 12 ? 'pm' : 'am'; break;
case 'A': time += hour > 12 ? 'AM' : 'PM'; break; case 'A': time += hour >= 12 ? 'PM' : 'AM'; break;
case 'g': case 'g':
case 'h': case 'h':
h = hour == 0 ? 12 : hour > 12 ? hour - 12 : hour; h = hour == 0 ? 12 : hour > 12 ? hour - 12 : hour;

Loading…
Cancel
Save