* Replace zero date to null.
This commit is contained in:
@@ -149,7 +149,7 @@ class cronModel extends model
|
||||
public function getLastTime()
|
||||
{
|
||||
$cron = $this->dao->select('*')->from(TABLE_CRON)->orderBy('lastTime desc')->limit(1)->fetch();
|
||||
return isset($cron->lastTime) ? $cron->lastTime : '0000-00-00 00:00:00';
|
||||
return isset($cron->lastTime) ? $cron->lastTime : null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -192,7 +192,7 @@ class cronModel extends model
|
||||
{
|
||||
$cron = fixer::input('post')
|
||||
->add('status', 'normal')
|
||||
->add('lastTime', '0000-00-00 00:00:00')
|
||||
->add('lastTime', null)
|
||||
->skipSpecial('m,h,dom,mon,dow,command')
|
||||
->get();
|
||||
|
||||
@@ -224,7 +224,7 @@ class cronModel extends model
|
||||
public function update($cronID)
|
||||
{
|
||||
$cron = fixer::input('post')
|
||||
->add('lastTime', '0000-00-00 00:00:00')
|
||||
->add('lastTime', null)
|
||||
->skipSpecial('m,h,dom,mon,dow,command')
|
||||
->get();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user