--- F:\Storage\Web Sites\HTML\S FatStudios Drupal 4.7 Beta 4\includes\form.inc Mon Mar 06 16:38:03 2006
+++ F:\Storage\Software\Web Software\Package\Drupal 4.7 Beta 4\drupal-4.7.0-beta4\includes\form.inc Thu Jan 26 05:39:48 2006
@@ -631,9 +631,7 @@
function expand_date($element) {
// Default to current date
if (!isset($element['#value'])) {
- $element['#value'] = array('minute' => format_date(time(), 'custom', 'i'),
- 'hour' => format_date(time(), 'custom', 'H'),
- 'day' => format_date(time(), 'custom', 'j'),
+ $element['#value'] = array('day' => format_date(time(), 'custom', 'j'),
'month' => format_date(time(), 'custom', 'n'),
'year' => format_date(time(), 'custom', 'Y'));
}
@@ -641,10 +639,8 @@
$element['#tree'] = TRUE;
// Determine the order of day, month, year in the site's chosen date format.
- $format = variable_get('date_format_short', 'm/d/Y - H:i');
+ $format = variable_get('date_format_short', 'm/d/Y');
$sort = array();
- $sort['minute'] = strpos($format, 'i');
- $sort['hour'] = max(strpos($format, 'H'), strpos($format, 'G'));
$sort['day'] = max(strpos($format, 'd'), strpos($format, 'j'));
$sort['month'] = max(strpos($format, 'm'), strpos($format, 'M'));
$sort['year'] = strpos($format, 'Y');
@@ -654,13 +650,7 @@
// Output multi-selector for date
foreach ($order as $type) {
switch ($type) {
- case 'minute':
- $options = drupal_map_assoc(range(0, 59), 'map_minute');
- break;
- case 'hour':
- $options = drupal_map_assoc(range(0, 23), 'map_hour');
- break;
- case 'day':
+ case 'day':
$options = drupal_map_assoc(range(1, 31));
break;
case 'month':
@@ -688,20 +678,6 @@
*/
function map_month($month) {
return format_date(gmmktime(0, 0, 0, $month, 2, 1970), 'custom', 'M', 0);
-}
-
-/**
- * Helper function for usage with drupal_map_assoc to display hours.
- */
-function map_hour($hour) {
- return format_date(gmmktime($hour, 0, 0, 1, 2, 1970), 'custom', 'h', 0);
-}
-
-/**
- * Helper function for usage with drupal_map_assoc to display minutes.
- */
-function map_minute($minute) {
- return format_date(gmmktime(0, $minute, 0, 1, 2, 1970), 'custom', 'i', 0);
}
/**