From badea469f67b1800fc172ee3c2ca921931e720c1 Mon Sep 17 00:00:00 2001 From: james Date: Fri, 11 Jun 2010 20:04:51 +0000 Subject: [PATCH] Switch hour and minute in the editor to dropdowns Fix passing extra parameters to emit_hour_selector Allow emit_minute_selector to work with different minute intervals --- admin/schedule.php | 4 ++-- common.inc.php | 14 +++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/admin/schedule.php b/admin/schedule.php index 6a4348f..7282d40 100644 --- a/admin/schedule.php +++ b/admin/schedule.php @@ -263,9 +263,9 @@
diff --git a/common.inc.php b/common.inc.php index 3f59ffa..9f65739 100644 --- a/common.inc.php +++ b/common.inc.php @@ -851,10 +851,10 @@ function emit_date_selector($name,$selected="") echo ""; } -function emit_hour_selector($name,$selected="",$extra) +function emit_hour_selector($name,$selected="",$extra="") { if($selected!="") $selected=(int)$selected; - echo "\n"; echo "\n"; @@ -871,14 +871,18 @@ function emit_hour_selector($name,$selected="",$extra) } -function emit_minute_selector($name,$selected="") +function emit_minute_selector($name,$selected="",$extra="",$interval=5) { - $mins=array("00","05","10","15","20","25","30","35","40","45","50","55"); + $mins=array(); + for($x=0;$x<60;$x+=$interval) { + $mins[]=$x; + } +// $mins=array("00","05","10","15","20","25","30","35","40","45","50","55"); echo "\n";