Merge branch '15.0'

This commit is contained in:
wangyidong
2021-07-06 19:28:30 +08:00
165 changed files with 4714 additions and 440 deletions
+8 -1
View File
@@ -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);