diff --git a/mod/forum/search.php b/mod/forum/search.php index 2778efb3747..f590fafe63d 100644 --- a/mod/forum/search.php +++ b/mod/forum/search.php @@ -304,10 +304,14 @@ function forum_print_big_search_form($course) { echo ''; echo ''.get_string('searchdatefrom', 'forum').':'; echo ''; - echo ' '; - if (empty($dateto)) { + if (empty($datefrom)) { + $datefromchecked = ''; $datefrom = make_timestamp(2000, 1, 1, 0, 0, 0); + }else{ + $datefromchecked = 'checked="checked"'; } + + echo ' '; print_date_selector('fromday', 'frommonth', 'fromyear', $datefrom); print_time_selector('fromhour', 'fromminute', $datefrom); @@ -323,10 +327,14 @@ function forum_print_big_search_form($course) { echo ''; echo ''.get_string('searchdateto', 'forum').':'; echo ''; - echo ' '; if (empty($dateto)) { + $datetochecked = ''; $dateto = time()+3600; + }else{ + $datetochecked = 'checked="checked"'; } + + echo ' '; print_date_selector('today', 'tomonth', 'toyear', $dateto); print_time_selector('tohour', 'tominute', $dateto);