From 96b2ae230b1310aa9d585ee83f2b69abe71cd9c1 Mon Sep 17 00:00:00 2001 From: sunhao Date: Tue, 15 Oct 2024 23:36:53 +0800 Subject: [PATCH] * [misc] fix projectSpace and productSpace not work as expected. --- module/doc/control.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index 340beeb355..f19dc41f85 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -1377,14 +1377,10 @@ class doc extends control $this->app->loadLang('file'); - $this->docZen->setSpacePageStorage($type, 'all', $spaceID, $libID, $moduleID, 0); - $libData = $this->doc->setMenuByType($type, $spaceID, $libID); - if(is_string($libData)) return $this->locate($libData); - list($libs, $libID, $object, $objectID, $objectDropdown) = $libData; - /* For product drop menu. */ - if(in_array($type, array('product', 'project', 'execution'))) + if($isNotDocTab && in_array($type, array('product', 'project', 'execution'))) { + $this->doc->setMenuByType($type, $spaceID, $libID); $objectKey = $type . 'ID'; $this->view->$objectKey = $spaceID; } @@ -1404,9 +1400,8 @@ class doc extends control $this->view->objectType = $type; $this->view->noSpace = $noSpace; $this->view->objectID = $spaceID; - $this->view->object = $object; $this->view->users = $this->loadModel('user')->getPairs('noclosed,noletter'); - $this->view->title = $type == 'custom' ? $this->lang->doc->tableContents : $object->name . $this->lang->hyphen . $this->lang->doc->tableContents; + $this->view->title = isset($lang->doc->spaceList[$type]) ? $lang->doc->spaceList[$type] : $this->lang->doc->common; $this->display(); }