mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 09:53:20 +01:00
Allow 00:00 times or 0h in date-(time|hour)only widgets, by differing
between 0 and ''/null
This commit is contained in:
parent
b195b3cb8d
commit
4d4d66ea9c
@ -105,7 +105,8 @@
|
|||||||
'data_format' => $data_format,
|
'data_format' => $data_format,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (!$value)
|
// for date-(time|hour)only widgets we distinct between between 0 and ''/null timestamps
|
||||||
|
if (!$value && ($type != 'date-timeonly' && $type != 'date-houronly' || (string)$value === ''))
|
||||||
{
|
{
|
||||||
$value = array(
|
$value = array(
|
||||||
'Y' => '',
|
'Y' => '',
|
||||||
@ -200,7 +201,7 @@
|
|||||||
);
|
);
|
||||||
for ($str='',$n = substr($type,-4) == 'only' ? 3 : 0; $n < count($format); ++$n)
|
for ($str='',$n = substr($type,-4) == 'only' ? 3 : 0; $n < count($format); ++$n)
|
||||||
{
|
{
|
||||||
if ($value[$format[$n]] && $n < 3 || $n >= 3 && ($value[$format[3]] || $value[$format[4]]))
|
if ($value[$format[$n]] && $n < 3 || $n >= 3 && ($value[$format[3]] !== '' || $value[$format[4]] !== ''))
|
||||||
{
|
{
|
||||||
if (!$n && $options & 16 )
|
if (!$n && $options & 16 )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user