From 909b3d9e13f25dc70adfe2d0d6a22076ad1d78d1 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Wed, 14 Apr 2021 09:43:53 +0800 Subject: [PATCH 1/2] * Fix doc details. --- module/doc/control.php | 2 +- module/doc/model.php | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index c1fc4f5226..e90b33ef34 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -310,7 +310,7 @@ class doc extends control $unclosed = strpos($this->config->doc->custom->showLibs, 'unclosed') !== false ? 'unclosedProject' : ''; $this->view->libID = $libID; - $this->view->libs = $this->doc->getLibs($type = 'all', $extra = "withObject,$unclosed", $libID, $objectID); + $this->view->libs = $this->doc->getLibs($objectType, $extra = "withObject,$unclosed", $libID, $objectID); $this->view->libName = $this->dao->findByID($libID)->from(TABLE_DOCLIB)->fetch('name'); $this->view->moduleOptionMenu = $this->tree->getOptionMenu($libID, 'doc', $startModuleID = 0); $this->view->moduleID = $moduleID ? (int)$moduleID : (int)$this->cookie->lastDocModule; diff --git a/module/doc/model.php b/module/doc/model.php index e0f2aa7f2a..0178b75275 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -37,14 +37,7 @@ class docModel extends model */ public function getLibs($type = '', $extra = '', $appendLibs = '', $objectID = 0) { - if($type == 'product' or $type == 'project' or $type == 'execution') - { - $stmt = $this->dao->select('*')->from(TABLE_DOCLIB) - ->where($type)->eq($objectID) - ->andWhere('deleted')->eq('0') - ->query(); - } - elseif($type == 'all') + if($type == 'all') { $stmt = $this->dao->select('*')->from(TABLE_DOCLIB) ->where('deleted')->eq(0) From 16d12813c4394d5db6da333b92af7c9b89b14257 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Wed, 14 Apr 2021 09:48:03 +0800 Subject: [PATCH 2/2] * Remove comment for execution setMenu. --- module/execution/model.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 80200ad880..ff16b54b77 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -69,16 +69,12 @@ class executionModel extends model /* Unset story, bug, build and testtask if type is ops. */ $execution = $this->getByID($executionID); - /* if($execution and $execution->lifetime == 'ops') { unset($this->lang->execution->menu->story); unset($this->lang->execution->menu->qa); - unset($this->lang->execution->subMenu->qa->bug); - unset($this->lang->execution->subMenu->qa->build); - unset($this->lang->execution->subMenu->qa->testtask); + unset($this->lang->execution->menu->build); } - */ /* Hide story and qa menu when execution is story or design type. */ /*