* Finish task#42096

This commit is contained in:
zenggang
2021-09-04 10:43:50 +08:00
parent 636517be88
commit 99a60c1954
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ class todosEntry extends entry
$this->batchSetPost($fields);
$this->setPost('date', $this->request('date', date("Y-m-d")));
$this->setPost('type', $this->request('date', 'custom'));
$this->setPost('type', $this->request('type', 'custom'));
$this->setPost('status', $this->request('status', 'wait'));
$this->setPost('begin', str_replace(':', '', $this->request('begin')));
$this->setPost('end', str_replace(':', '', $this->request('end')));
+5 -1
View File
@@ -143,7 +143,11 @@ class todo extends control
if(!empty($_POST))
{
$changes = $this->todo->update($todoID);
if(dao::isError()) die(js::error(dao::getError()));
if(dao::isError())
{
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'message' => dao::getError()));
die(js::error(dao::getError()));
}
if($changes)
{
$actionID = $this->loadModel('action')->create('todo', $todoID, 'edited');