From 6d41bfbe026af46092b29bbd7912035591f8328f Mon Sep 17 00:00:00 2001 From: "chencongzhi520@gmail.com" Date: Sat, 4 May 2013 02:39:21 +0000 Subject: [PATCH] * fix bug#246. --- module/action/model.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/action/model.php b/module/action/model.php index d5484c2c18..989444f930 100644 --- a/module/action/model.php +++ b/module/action/model.php @@ -484,9 +484,11 @@ class actionModel extends model } else { - $todos = $this->dao->select("id, $field AS name, account, private")->from($table)->where('id')->in($objectIds)->fetchAll('id'); + $todos = $this->dao->select("id, $field AS name, account, private, type, idvalue")->from($table)->where('id')->in($objectIds)->fetchAll('id'); foreach($todos as $id => $todo) { + if($todo->type == 'task') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_TASK)->fetch('name'); + if($todo->type == 'bug') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_BUG)->fetch('title'); if($todo->private == 1 and $todo->account != $this->app->user->account) { $objectNames[$objectType][$id] = $this->lang->todo->thisIsPrivate;