corrected warnings in html_select_time function, made make timestamp always return a timestamp

This commit is contained in:
mohrt
2002-06-18 14:15:58 +00:00
parent 12598ef1dc
commit 2fcb7baf53
5 changed files with 14 additions and 4 deletions

2
NEWS
View File

@@ -1,3 +1,5 @@
- fixed warnings with html_select_date and timestamp
functions (Monte)
- added support for sub directory exlusion format (Monte)
- added support for grouping by cache_id, compile_id
and segments thereof (Monte)

View File

@@ -56,6 +56,7 @@ function smarty_function_html_select_date($params, &$smarty)
$field_order = 'MDY';
/* String printed between the different fields. */
$field_separator = "\n";
$time = time();
extract($params);

View File

@@ -22,8 +22,11 @@ function smarty_make_timestamp($string)
return $time;
}
// can't decipher, just return it
return $string;
// couldn't recognize it, try to return a time
if ((int) $time > 0)
return (int) $time;
else
return time();
}
/* vim: set expandtab: */

View File

@@ -56,6 +56,7 @@ function smarty_function_html_select_date($params, &$smarty)
$field_order = 'MDY';
/* String printed between the different fields. */
$field_separator = "\n";
$time = time();
extract($params);

View File

@@ -22,8 +22,11 @@ function smarty_make_timestamp($string)
return $time;
}
// can't decipher, just return it
return $string;
// couldn't recognize it, try to return a time
if ((int) $time > 0)
return (int) $time;
else
return time();
}
/* vim: set expandtab: */