From c0072603fd7fc7fb2a0ba01b4ee6734c369a851e Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Fri, 4 Dec 2020 14:05:57 +0800 Subject: [PATCH] * Fix bug #3718. --- module/action/model.php | 10 ++++++---- module/todo/control.php | 1 - 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/module/action/model.php b/module/action/model.php index fbf6618024..d30d384dc6 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -367,10 +367,12 @@ class actionModel extends model $action->extra = strtolower($extra); if($id) { - $table = $this->config->objectTables[$action->extra]; - $field = $this->config->action->objectNameFields[$action->extra]; - $name = $this->dao->select($field)->from($table)->where('id')->eq($id)->fetch($field); - if($name) $action->appendLink = html::a(helper::createLink($action->extra, 'view', "id=$id"), "#$id " . $name); + $table = $this->config->objectTables[$action->extra]; + $field = $this->config->action->objectNameFields[$action->extra]; + $object = $this->dao->select($field . ',PRJ')->from($table)->where('id')->eq($id)->fetch(); + $name = $object->$field; + $PRJ = $object->PRJ; + if($name) $action->appendLink = html::a(helper::createLink($action->extra, 'view', "id=$id", '', '', $PRJ), "#$id " . $name); } } } diff --git a/module/todo/control.php b/module/todo/control.php index a6c06b7028..6d3caacd73 100644 --- a/module/todo/control.php +++ b/module/todo/control.php @@ -370,7 +370,6 @@ class todo extends control } $projects = $this->loadModel('program')->getPRJPairs(); - //$projectID = isset($this->session->PRJ) ? $this->session->PRJ : key($projects); if(!isset($this->session->PRJ)) $this->session->set('PRJ', key($projects)); $this->view->title = $this->app->user->account == $todo->account ? "{$this->lang->todo->common} #$todo->id $todo->name" : $this->lang->todo->common ;