* Finish task#42096
This commit is contained in:
@@ -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')));
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user