From 59e850ed48661d42e55f48e99e24703bc68a7df2 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 18 Apr 2023 15:54:23 +0800 Subject: [PATCH] * Fix bug #34312. --- module/doc/control.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/module/doc/control.php b/module/doc/control.php index 8a41d055b8..3ff17ec680 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -341,7 +341,20 @@ class doc extends control if(!empty($lib->main)) return print(js::alert($this->lang->doc->errorMainSysLib)); $this->doc->delete(TABLE_DOCLIB, $libID); - return print(js::reload('parent')); + if($this->app->tab == 'doc' and $from == 'teamSpace') return print(js::reload('parent')); + + $objectType = $lib->type; + $objectID = strpos(',product,project,execution,', ",$objectType,") !== false ? $lib->{$objectType} : 0; + $moduleName = 'doc'; + $methodName = zget($this->config->doc->spaceMethod, $objectType); + if($this->app->tab == 'execution' and $objectType == 'execution') + { + $moduleName = 'execution'; + $methodName = 'doc'; + } + $browseLink = $this->createLink($moduleName, $methodName, "objectID=$objectID"); + + return print(js::locate($browseLink, 'parent')); } }