From 4342c8ed4e5646e598cecd348dd1d72667d9a8b5 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Tue, 7 Jan 2025 09:04:34 +0800 Subject: [PATCH] * [misc] Optimized code. --- module/story/tao.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/tao.php b/module/story/tao.php index 41d7b4ea96..79b690276a 100644 --- a/module/story/tao.php +++ b/module/story/tao.php @@ -2055,7 +2055,7 @@ class storyTao extends storyModel if(common::hasPriv($story->type, 'edit')) $actions[] = array('name' => 'edit', 'url' => $this->isClickable($story, 'edit') ? $editLink : null, 'disabled' => !$canEdit); /* Create test case button. */ - if($story->type == 'story' && $this->config->vision != 'lite' && common::hasPriv('testcase', 'create')) $actions[] = array('name' => 'testcase', 'url' => common::hasPriv('testcase', 'create') && $story->isParent == '0' ? $createCaseLink : null, 'disabled' => $story->isParent == '1' || !common::hasPriv('testcase', 'create'), 'data-toggle' => 'modal', 'data-size' => 'lg'); + if($story->type == 'story' && $this->config->vision != 'lite' && common::hasPriv('testcase', 'create')) $actions[] = array('name' => 'testcase', 'url' => $story->isParent == '0' ? $createCaseLink : null, 'disabled' => $story->isParent == '1', 'data-toggle' => 'modal', 'data-size' => 'lg'); /* Batch create button. */ $shadow = $this->dao->findByID($story->product)->from(TABLE_PRODUCT)->fetch('shadow');