From 4469f64918461616da690b4a6e4be1239d2ecfa5 Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Wed, 7 Apr 2021 12:27:12 +0300 Subject: [PATCH] * Fix bug#11837. --- module/doc/control.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index d9740010d6..d632d7b599 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -355,7 +355,7 @@ class doc extends control else if($this->app->openApp == 'execution') { $this->execution->setMenu($objectID); - unset($this->lang->exectuion->menu->doc['subMenu']); + unset($this->lang->execution->menu->doc['subMenu']); } else { @@ -516,7 +516,17 @@ class doc extends control $type = $docLib->type; $objectID = $docLib->$type; } - $this->locate(inLink('objectLibs', "type=$type&objectID=$objectID&libID=$libID&docID=$docID")); + + $openApp = $type == 'execution' ? 'execution' : 'doc'; + $browseLink = inLink('objectLibs', "type=$type&objectID=$objectID&libID=$libID&docID=$docID#app=$openApp"); + if($type == 'execution') + { + die(js::locate($browseLink, 'parent')); + } + else + { + $this->locate($browseLink); + } } if($doc->contentType == 'markdown') @@ -1047,6 +1057,7 @@ class doc extends control $this->view->type = $type; $this->view->version = $version; $this->view->object = $object; + $this->view->objectID = $objectID; $this->view->objectType = $type; $this->view->libID = $libID; $this->view->lib = isset($libs[$libID]) ? $libs[$libID] : new stdclass();