]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19808 Upgraded calls to print_time_selector and print_date_selector
authornicolasconnault <nicolasconnault>
Thu, 6 Aug 2009 01:07:51 +0000 (01:07 +0000)
committernicolasconnault <nicolasconnault>
Thu, 6 Aug 2009 01:07:51 +0000 (01:07 +0000)
mod/forum/search.php

index 9d8eb616a2edd9a63b6562b9513b9d5191a79a96..94dca5446fa007f567762e1fb81dbf86bb622122 100644 (file)
  * @todo Document this function
  */
 function forum_print_big_search_form($course) {
-    global $CFG, $DB, $words, $subject, $phrase, $user, $userid, $fullwords, $notwords, $datefrom, $dateto, $PAGE;
+    global $CFG, $DB, $words, $subject, $phrase, $user, $userid, $fullwords, $notwords, $datefrom, $dateto, $PAGE, $OUTPUT;
 
     print_simple_box(get_string('searchforumintro', 'forum'), 'center', '', '', 'searchbox', 'intro');
 
@@ -291,9 +291,10 @@ function forum_print_big_search_form($course) {
     }
 
     echo '<input name="timefromrestrict" type="checkbox" value="1" alt="'.get_string('searchdatefrom', 'forum').'" onclick="return lockoptions(\'searchform\', \'timefromrestrict\', timefromitems)" '.  $datefromchecked . ' /> ';
-    print_date_selector('fromday', 'frommonth', 'fromyear', $datefrom);
-    print_time_selector('fromhour', 'fromminute', $datefrom);
-
+    $selectors = moodle_select::make_time_selectors(array('days' => 'fromday','months' => 'frommonth', 'years' => 'fromyear', 'hours' => 'fromhour', 'minutes' => 'fromminute'), $datefrom);
+    foreach ($selectors as $select) {
+        echo $OUTPUT->select($select);
+    }
     echo '<input type="hidden" name="hfromday" value="0" />';
     echo '<input type="hidden" name="hfrommonth" value="0" />';
     echo '<input type="hidden" name="hfromyear" value="0" />';