mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
Fix validation of durations
This commit is contained in:
parent
3d50a2bc4b
commit
868614fd23
@ -79,10 +79,15 @@ class etemplate_widget_date extends etemplate_widget_transformer
|
||||
{
|
||||
self::set_validation_error($form_name,lang('Field must not be empty !!!'));
|
||||
}
|
||||
elseif ($this->type == 'date-duration')
|
||||
{
|
||||
$valid = $value;
|
||||
}
|
||||
elseif (empty($this->attrs['dataformat'])) // integer timestamp
|
||||
{
|
||||
$valid = (int)$value;
|
||||
}
|
||||
|
||||
// string with formatting letters like for php's date() method
|
||||
elseif (($valid = date($this->attrs['dataformat'], $value)))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user