Managesieve: Fix AM/PM suffix in vacation time selectors

release-1.2
Aleksander Machniak 7 years ago
parent 822afb7afd
commit f9151f6830

@ -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)

@ -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();

@ -870,8 +870,8 @@ function sieve_formattime(hour, minutes)
for (i=0; i<format.length; i++) {
c = format.charAt(i);
switch (c) {
case 'a': time += hour > 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;

Loading…
Cancel
Save