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:
Simon Holywell 2012-05-02 12:18:53 +01:00
parent 696f2d06d6
commit 6c130cd3ca

View File

@ -156,6 +156,15 @@ class IDF_Issue extends Pluf_Model
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)
{
if ($this->id == '') {