Merge branch '15.0'
This commit is contained in:
@@ -213,7 +213,6 @@ class todoModel extends model
|
||||
public function update($todoID)
|
||||
{
|
||||
$oldTodo = $this->dao->findById((int)$todoID)->from(TABLE_TODO)->fetch();
|
||||
if(in_array($oldTodo->type, $this->config->todo->moduleList)) $oldTodo->name = '';
|
||||
|
||||
$objectType = $this->post->type;
|
||||
$hasObject = in_array($objectType, $this->config->todo->moduleList);
|
||||
@@ -231,6 +230,14 @@ class todoModel extends model
|
||||
->remove(implode(',', $this->config->todo->moduleList) . ',uid')
|
||||
->get();
|
||||
|
||||
if($todo->type != 'custom')
|
||||
{
|
||||
$type = $todo->type;
|
||||
$object = $this->loadModel($type)->getByID($objectType);
|
||||
if(isset($object->name)) $todo->name = $object->name;
|
||||
if(isset($object->title)) $todo->name = $object->title;
|
||||
}
|
||||
|
||||
if($todo->end < $todo->begin)
|
||||
{
|
||||
dao::$errors[] = sprintf($this->lang->error->gt, $this->lang->todo->end, $this->lang->todo->begin);
|
||||
|
||||
Reference in New Issue
Block a user