mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 01:28:47 +02:00
#854...ROLLBACK, undoing the commit [3185]. The implementation has been postponed to the next major relase.
SVN:trunk[3255]
This commit is contained in:
@@ -2510,16 +2510,18 @@ class AttributeDateTime extends AttributeDBField
|
||||
return $iUnixSeconds;
|
||||
}
|
||||
|
||||
// This has been done at the time when itop was using TIMESTAMP columns,
|
||||
// now that iTop is using DATETIME columns, it seems possible to have IsNullAllowed returning false... later when this is needed
|
||||
public function IsNullAllowed() {return true;}
|
||||
public function GetDefaultValue()
|
||||
{
|
||||
$default = parent::GetDefaultValue();
|
||||
|
||||
if (!empty($default))
|
||||
if (!parent::IsNullAllowed())
|
||||
{
|
||||
$iDate = strtotime($default);
|
||||
if ($iDate !== false)
|
||||
if (empty($default))
|
||||
{
|
||||
$default = date($this->GetDateFormat(), $iDate);
|
||||
$default = date($this->GetDateFormat());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user