Fix error where a due date of 0000-00-00 00:00:00 was not equated to empty by forcing to null in model restore() method
This commit is contained in:
parent
696f2d06d6
commit
6c130cd3ca
@ -156,6 +156,15 @@ class IDF_Issue extends Pluf_Model
|
|||||||
IDF_Search::remove($this);
|
IDF_Search::remove($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function restore()
|
||||||
|
{
|
||||||
|
// Note: If a due date has not been set then it should
|
||||||
|
// be set to null and not a useless/confusing date so...
|
||||||
|
if ('0000-00-00 00:00:00' === $this->due_dtime) {
|
||||||
|
$this->due_dtime = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function preSave($create=false)
|
function preSave($create=false)
|
||||||
{
|
{
|
||||||
if ($this->id == '') {
|
if ($this->id == '') {
|
||||||
|
Loading…
Reference in New Issue
Block a user