#854...ROLLBACK, undoing the commit [3185]. The implementation has been postponed to the next major relase.

SVN:trunk[3255]
This commit is contained in:
Romain Quetiez
2014-07-09 09:49:02 +00:00
parent f6d0bda737
commit 5f5125a131
9 changed files with 14 additions and 12 deletions

View File

@@ -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());
}
}