From 87a515c803f75e5dd0e64106d2a20c35450dfeae Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Wed, 6 Apr 2022 09:53:13 +0800 Subject: [PATCH] * Fix the bug of doc lib related actions don't show. --- module/action/model.php | 8 ++++---- module/api/control.php | 10 ++++++---- module/doc/control.php | 4 +++- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/module/action/model.php b/module/action/model.php index 40c55ee22d..d5937c297a 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -1072,7 +1072,7 @@ class actionModel extends model /* Add name field to the actions. */ $action->objectName = isset($objectNames[$action->objectType][$action->objectID]) ? $objectNames[$action->objectType][$action->objectID] : ''; - if($action->objectType =='program' and strpos('syncexecution,syncproject,syncprogram', $action->action) !==false) + if($action->objectType == 'program' and strpos('syncexecution,syncproject,syncprogram', $action->action) !== false) { $action->objectName .= $this->lang->action->label->startProgram; } @@ -1319,9 +1319,9 @@ class actionModel extends model { $libID = $action->objectID; $type = 'custom'; - if($action->execution != 0) $type = 'execution'; - if($action->project != 0) $type = 'project'; - if($action->product != ',0,') $type = 'product'; + if(!empty($action->project)) $type = 'project'; + if(!empty($action->execution)) $type = 'execution'; + if(!empty($action->product)) $type = 'product'; $libObjectID = $type != 'custom' ? $action->$type : ''; $libObjectID = trim($libObjectID, ','); diff --git a/module/api/control.php b/module/api/control.php index 39a9ea20d7..05d51bd5a6 100755 --- a/module/api/control.php +++ b/module/api/control.php @@ -1,5 +1,4 @@ view->customObjectLibs = $customObjectLibs; $this->view->showLibs = $this->config->doc->custom->objectLibs; @@ -1053,7 +1055,7 @@ class doc extends control $this->view->position[] = ($type == 'book' or $type == 'custom') ? $this->lang->doc->customAB : $object->name; $this->view->docID = $docID; - $this->view->doc = $docID ? $doc : ''; + $this->view->doc = $doc; $this->view->type = $type; $this->view->version = $version; $this->view->object = $object;