Fixed a bug that custom "interval values" had not been used as default

module interval (you can add custom ones at 'visual styles' configuration).
This commit is contained in:
Hirofumi Kosaka 2016-03-22 13:25:15 +09:00
parent 195f0628f0
commit 15ec55589c
1 changed files with 10 additions and 1 deletions

View File

@ -598,6 +598,15 @@ function html_print_extended_select_for_time ($name, $selected = '', $script = '
$fields = get_periods();
if ( ! $selected ) {
foreach( $fields as $t_key => $t_value){
if ( $t_key != -1 ) { // -1 means 'custom'
$selected = $t_key;
break;
}
}
}
if (($selected !== false) && (!isset($fields[$selected]) && $selected != 0)) {
$fields[$selected] = human_time_description_raw($selected,true);
}