From ce19ef457c5aa87ee71e8ce5ebbc9efe5967fb62 Mon Sep 17 00:00:00 2001 From: liugang Date: Wed, 9 Aug 2023 10:30:25 +0800 Subject: [PATCH] * testcase: refactor the ajaxGetModuleScenes method. --- module/testcase/control.php | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index 1a026bf178..3dedf19c70 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -2630,24 +2630,16 @@ class testcase extends control * @param int $productID * @param int $branch * @param int $moduleID - * @param int $stype - * @param int $storyID - * @param bool $onlyOption - * @param string $status - * @param string $limit - * @param string $type - * @param int $hasParent - * @param string $number - * @param int $currentScene + * @param string $element + * @param int $sceneID * @access public * @return void */ - public function ajaxGetModuleScenes($productID, $branch = 0, $moduleID = 0, $stype = 1, $storyID = 0, $onlyOption = 'false', $status = '', $limit = 0, $type = 'full', $hasParent = 1, $number = '', $currentScene = 0) + public function ajaxGetScenes($productID, $branch = 0, $moduleID = 0, $element = 'scene', $sceneID = 0) { - $optionMenu = $this->testcase->getSceneMenu($productID, $moduleID, 'case', 0, $branch, $currentScene); - $output = ($stype == 1) ? html::select("parent", $optionMenu, "", "class='form-control'") : $output = html::select("scene".$number, $optionMenu, array('' => ''), "class='form-control'"); + $scenes = $this->testcase->getSceneMenu($productID, $moduleID, 'case', 0, $branch, $sceneID); - die($output); + die(html::select($element, $scenes, '', "class='form-control'")); } /**