From e431847c583d2ea7fe64794d986f27dbc6c6fa66 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Thu, 25 Nov 2021 12:22:56 +0800 Subject: [PATCH] * Add the branch switcher in tree browse page. --- config/filter.php | 1 - module/product/model.php | 3 ++- module/tree/control.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/filter.php b/config/filter.php index e35d666e1f..d80724ca83 100644 --- a/config/filter.php +++ b/config/filter.php @@ -207,7 +207,6 @@ $filter->api->edit->get['libID'] = 'int'; $filter->api->edit->get['module'] = 'int'; $filter->api->edit->get['apiID'] = 'int'; - $filter->file->download->cookie[$config->sessionVar] = 'code'; $filter->mail->ztcloud->cookie['ztCloudLicense'] = 'equal::yes'; diff --git a/module/product/model.php b/module/product/model.php index 5b4b11f951..21698f7848 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -533,7 +533,8 @@ class productModel extends model $notNormalProduct = (isset($currentProduct->type) and $currentProduct->type != 'normal'); $isTrackMethod = ($currentModule == 'story' and $currentMethod == 'track'); - $isShowBranchMethod = (strpos($this->config->product->showBranchMethod, $currentMethod) !== false and $currentModule == 'product') || $isTrackMethod; + $isTreeBrowseMethod = ($currentModule == 'tree' and $currentMethod == 'browse'); + $isShowBranchMethod = (strpos($this->config->product->showBranchMethod, $currentMethod) !== false and $currentModule == 'product') || $isTrackMethod || $isTreeBrowseMethod; if($notNormalProduct and strpos(',testsuite,testreport,', ',' . $currentModule . ',') === false and ($this->app->tab == 'qa' or $isShowBranchMethod)) { $this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$currentProduct->type]); diff --git a/module/tree/control.php b/module/tree/control.php index fa0d1fa46a..1277e71be1 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -31,7 +31,7 @@ class tree extends control if($this->app->tab == 'product') { - $this->product->setMenu($rootID, 0, 0, '', $viewType); + $this->product->setMenu($rootID, $branch, 0, '', $viewType); } else if($this->app->tab == 'qa' and $viewType != 'caselib') {