mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 02:14:26 +02:00
corrected warnings in html_select_time function, made make timestamp always return a timestamp
This commit is contained in:
2
NEWS
2
NEWS
@@ -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)
|
||||
|
@@ -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);
|
||||
|
@@ -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: */
|
||||
|
@@ -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);
|
||||
|
@@ -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: */
|
||||
|
Reference in New Issue
Block a user