From ecb973f9d9668226ae701a27a614cf4be3ade67f Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Wed, 30 Jun 2021 17:13:39 +0800 Subject: [PATCH] * Adjust code. --- module/action/model.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/module/action/model.php b/module/action/model.php index 66b648554e..74b1846ada 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -1064,11 +1064,12 @@ class actionModel extends model and strpos($this->config->action->assetType, $action->objectType) !== false and empty($action->project) and empty($action->product) and empty($action->execution)) { - if($action->objectType == 'doc' and strpos($this->config->action->docAction, $action->action) !== false) + if($action->objectType == 'doc') { - $method = strpos($action->action, 'practice') ? 'practiceView' : 'componentView'; + $assetLibType = $this->dao->select('assetLibType')->from(TABLE_DOC)->where('id')->eq($action->objectID)->fetch('assetLibType'); + $method = $assetLibType == 'practice' ? 'practiceView' : 'componentView'; } - elseif($action->objectType != 'doc') + else { $method = $this->config->action->assetViewMethod[$action->objectType]; }