From 01fe94e4c2215039af6c22d6ea38544eb44d4d80 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Wed, 13 Mar 2024 13:06:18 +0800 Subject: [PATCH] * Rename function. --- module/custom/control.php | 2 +- module/custom/test/model/setstorygrade.php | 4 ++-- module/custom/zen.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/custom/control.php b/module/custom/control.php index ca8e62e5bb..1320bc2af8 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -296,7 +296,7 @@ class custom extends control public function deleteGrade(string $type = 'story', int $gradeID = 0, string $confirm = 'no') { $story = $this->dao->select('id')->from(TABLE_STORY)->where('grade')->eq($gradeID)->andWhere('type')->eq($type)->limit(1)->fetch('id'); - if($story) return $this->send(array('result' => 'fail', 'load' => array('alert' => $this->lang->custom->notice->gradeNotEmpty))); + if($story) return $this->send(array('result' => 'fail', 'callback' => "zui.Modal.alert('{$this->lang->custom->notice->gradeNotEmpty}');")); if($confirm == 'no') { diff --git a/module/custom/test/model/setstorygrade.php b/module/custom/test/model/setstorygrade.php index 2715142467..24248c3b7b 100755 --- a/module/custom/test/model/setstorygrade.php +++ b/module/custom/test/model/setstorygrade.php @@ -41,8 +41,8 @@ $data['gradeName'] = array( global $tester; $tester->loadModel('custom')->setStoryGrade('story', $data); -$gradeSetting = $tester->loadModel('story')->getGradeSetting(); +$gradeSetting = $tester->loadModel('story')->getGradeList(); r(count($gradeSetting)) && p() && e('5'); // 查看插入的等级数量 r($gradeSetting) && p('0:grade,name,status') && e('1,一级,enable'); // 查看插入的等级1详情 -r($gradeSetting) && p('4:grade,name,status') && e('5,五级,enable'); // 查看插入的等级5详情 \ No newline at end of file +r($gradeSetting) && p('4:grade,name,status') && e('5,五级,enable'); // 查看插入的等级5详情 diff --git a/module/custom/zen.php b/module/custom/zen.php index 882482f01b..4a453f888e 100644 --- a/module/custom/zen.php +++ b/module/custom/zen.php @@ -95,7 +95,7 @@ class customZen extends custom } if(in_array($module, array('story', 'requirement', 'epic')) && $field == 'grade') { - $this->view->storyGrades = $this->loadModel('story')->getGradeSetting($module); + $this->view->storyGrades = $this->loadModel('story')->getGradeList($module); } if(in_array($module, array('story', 'testcase', 'demand', 'requirement', 'epic')) && $field == 'review') {