diff --git a/module/todo/model.php b/module/todo/model.php index 47a49eb31b..8031a80a98 100644 --- a/module/todo/model.php +++ b/module/todo/model.php @@ -110,10 +110,10 @@ class todoModel extends model public function update($todoID) { $oldTodo = $this->getById($todoID); - if($oldTodo->type != 'custom') $oldTodo->name = ''; + if($oldTodo->type == 'bug' or $oldTodo->type == 'task') $oldTodo->name = ''; $todo = fixer::input('post') ->cleanInt('date, pri, begin, end, private') - ->setIF($this->post->type != 'custom', 'name', '') + ->setIF($this->post->type == 'bug' or $this->post->type == 'task', 'name', '') ->setIF($this->post->date == false, 'date', '2030-01-01') ->setIF($this->post->begin == false, 'begin', '2400') ->setIF($this->post->end == false, 'end', '2400') @@ -166,7 +166,7 @@ class todoModel extends model foreach($todos as $todoID => $todo) { $oldTodo = $this->getById($todoID); - if($oldTodo->type != 'custom') $oldTodo->name = ''; + if($oldTodo->type == 'bug' or $oldTodo->type == 'task') $oldTodo->name = ''; $this->dao->update(TABLE_TODO)->data($todo) ->autoCheck() ->checkIF($todo->type == 'custom', $this->config->todo->edit->requiredFields, 'notempty') diff --git a/module/todo/view/edit.html.php b/module/todo/view/edit.html.php index 84ade21f90..fa3f5ef9d2 100644 --- a/module/todo/view/edit.html.php +++ b/module/todo/view/edit.html.php @@ -45,7 +45,7 @@