From 3ca8412a845905b83f9f2288961c84b5c30e3fc7 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 28 Apr 2022 06:50:09 +0000 Subject: [PATCH 1/6] * Fix bug #22032. --- module/action/model.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/module/action/model.php b/module/action/model.php index 96b34124ee..49c6bb075e 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -1298,8 +1298,14 @@ class actionModel extends model $action->objectLabel = $objectLabel; $action->product = trim($action->product, ','); + $objectTable = zget($this->config->objectTables, $action->objectType); + $objectDeleted = $this->dao->select('deleted')->from($objectTable)->where('id')->eq($action->objectID)->fetch('deleted'); - if($this->config->edition == 'max' + if($objectDeleted == 1) + { + $action->objectLink = ''; + } + elseif($this->config->edition == 'max' and strpos($this->config->action->assetType, $action->objectType) !== false and empty($action->project) and empty($action->product) and empty($action->execution)) { From a2d0d3d6cddab44124c31793e5319a5b8a1f2dfa Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 28 Apr 2022 07:01:02 +0000 Subject: [PATCH 2/6] * Fix bug #22023. --- module/action/model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/action/model.php b/module/action/model.php index 49c6bb075e..611d0f79b2 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -1300,8 +1300,9 @@ class actionModel extends model $action->product = trim($action->product, ','); $objectTable = zget($this->config->objectTables, $action->objectType); $objectDeleted = $this->dao->select('deleted')->from($objectTable)->where('id')->eq($action->objectID)->fetch('deleted'); + $noLink = array('program', 'project', 'product', 'execution'); - if($objectDeleted == 1) + if(in_array($action->objectType, $noLink) and $objectDeleted == 1) { $action->objectLink = ''; } From b8880f493e625bcae805493a552f7e39bfac3d0a Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 28 Apr 2022 07:02:37 +0000 Subject: [PATCH 3/6] * Fix bug #22023. --- module/action/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/action/model.php b/module/action/model.php index 611d0f79b2..caf310b0d4 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -1304,7 +1304,7 @@ class actionModel extends model if(in_array($action->objectType, $noLink) and $objectDeleted == 1) { - $action->objectLink = ''; + $action->objectLink = ''; } elseif($this->config->edition == 'max' and strpos($this->config->action->assetType, $action->objectType) !== false From 2dd822a1f799417c340b96a46207ac745b4b6610 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 28 Apr 2022 07:42:14 +0000 Subject: [PATCH 4/6] * Fix bug #22032. --- module/action/model.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/module/action/model.php b/module/action/model.php index caf310b0d4..7d5cbc1a89 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -1298,15 +1298,16 @@ class actionModel extends model $action->objectLabel = $objectLabel; $action->product = trim($action->product, ','); - $objectTable = zget($this->config->objectTables, $action->objectType); - $objectDeleted = $this->dao->select('deleted')->from($objectTable)->where('id')->eq($action->objectID)->fetch('deleted'); - $noLink = array('program', 'project', 'product', 'execution'); - if(in_array($action->objectType, $noLink) and $objectDeleted == 1) + $judgeDeletedObject = array('program', 'project', 'product', 'execution'); + if(in_array($action->objectType, $judgeDeletedObject)) { - $action->objectLink = ''; + $objectTable = zget($this->config->objectTables, $action->objectType); + $objectDeleted = $this->dao->select('deleted')->from($objectTable)->where('id')->eq($action->objectID)->fetch('deleted'); + if($objectDeleted) return $action; } - elseif($this->config->edition == 'max' + + if($this->config->edition == 'max' and strpos($this->config->action->assetType, $action->objectType) !== false and empty($action->project) and empty($action->product) and empty($action->execution)) { From aa0e8579cfdeedb7b04bbddc038f9c894d87bd86 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 28 Apr 2022 09:21:47 +0000 Subject: [PATCH 5/6] * Fix bug #22032. --- module/action/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/action/model.php b/module/action/model.php index 7d5cbc1a89..e94e03d9e4 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -1299,7 +1299,7 @@ class actionModel extends model $action->objectLabel = $objectLabel; $action->product = trim($action->product, ','); - $judgeDeletedObject = array('program', 'project', 'product', 'execution'); + $noLinkObjects = array('program', 'project', 'product', 'execution'); if(in_array($action->objectType, $judgeDeletedObject)) { $objectTable = zget($this->config->objectTables, $action->objectType); From 8ac71d35c5f3b96003d41d470a188e8d17969def Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 28 Apr 2022 09:25:28 +0000 Subject: [PATCH 6/6] * Fix bug #22032. --- module/action/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/action/model.php b/module/action/model.php index e94e03d9e4..bbea80d598 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -1300,7 +1300,7 @@ class actionModel extends model $action->product = trim($action->product, ','); $noLinkObjects = array('program', 'project', 'product', 'execution'); - if(in_array($action->objectType, $judgeDeletedObject)) + if(in_array($action->objectType, $noLinkObjects)) { $objectTable = zget($this->config->objectTables, $action->objectType); $objectDeleted = $this->dao->select('deleted')->from($objectTable)->where('id')->eq($action->objectID)->fetch('deleted');