From cda4d7e809aa0d2be3c60903a7a3ef790167d7f5 Mon Sep 17 00:00:00 2001 From: zhouxin Date: Wed, 1 Jun 2022 08:56:49 +0000 Subject: [PATCH] * Adjust code. --- module/execution/view/story.html.php | 2 +- module/story/model.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/module/execution/view/story.html.php b/module/execution/view/story.html.php index 52375ac0d4..8f92741b8c 100644 --- a/module/execution/view/story.html.php +++ b/module/execution/view/story.html.php @@ -221,7 +221,7 @@ $value) { - $this->story->printCell($value, $story, $users, '', $storyStages, $modulePairs, $storyTasks, $storyBugs, $storyCases, $useDatatable ? 'datatable' : 'table', '', $execution, $showBranch, $productID); + $this->story->printCell($value, $story, $users, '', $storyStages, $modulePairs, $storyTasks, $storyBugs, $storyCases, $useDatatable ? 'datatable' : 'table', '', $execution, $showBranch); } ?> diff --git a/module/story/model.php b/module/story/model.php index 4c62d40a89..6a19820dbd 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3806,7 +3806,7 @@ class storyModel extends model * @access public * @return string */ - public function buildOperateMenu($story, $type = 'view', $execution = '', $productID = 0) + public function buildOperateMenu($story, $type = 'view', $execution = '') { $menu = ''; $params = "storyID=$story->id"; @@ -3924,7 +3924,7 @@ class storyModel extends model if($hasDBPriv) $menu .= common::printIcon('task', 'batchCreate', "executionID={$execution->id}&story={$story->id}", '', 'list', 'pluses', '', $toTaskDisabled); $this->lang->testcase->batchCreate = $this->lang->testcase->create; - if($productID and $hasDBPriv and common::hasPriv('testcase', 'create')) + if($hasDBPriv and common::hasPriv('testcase', 'create')) { $menu .= html::a(helper::createLink('testcase', 'create', "productID=$story->product&branch=$story->branch&moduleID=$story->module&form=¶m=0&storyID=$story->id"), '', '', "class='btn' title='{$this->lang->testcase->create}' data-app='qa'"); } @@ -4104,7 +4104,7 @@ class storyModel extends model * @access public * @return void */ - public function printCell($col, $story, $users, $branches, $storyStages, $modulePairs = array(), $storyTasks = array(), $storyBugs = array(), $storyCases = array(), $mode = 'datatable', $storyType = 'story', $execution = '', $isShowBranch = '', $productID = 0) + public function printCell($col, $story, $users, $branches, $storyStages, $modulePairs = array(), $storyTasks = array(), $storyBugs = array(), $storyCases = array(), $mode = 'datatable', $storyType = 'story', $execution = '', $isShowBranch = '') { $module = $this->app->rawModule == 'product' ? 'story' : $this->app->rawModule; $canView = common::hasPriv($module, 'view'); @@ -4385,7 +4385,7 @@ class storyModel extends model $menuType = 'browse'; $execution = ''; } - echo $this->buildOperateMenu($story, $menuType, $execution, $productID); + echo $this->buildOperateMenu($story, $menuType, $execution); break; } echo '';