From c87ea9131a456962344d6bc07a194b50f66fedda Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 27 Mar 2023 11:34:22 +0800 Subject: [PATCH] * fix for sonar. --- module/story/control.php | 7 +++---- module/tree/model.php | 6 ++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/module/story/control.php b/module/story/control.php index 43a7d4b663..6907447451 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -1552,7 +1552,7 @@ class story extends control if($story->parent > 0) { $this->story->updateParentStatus($story->id); - $this->loadModel('action')->create('story', $task->parent, 'deleteChildrenStory', '', $storyID); + $this->action->create('story', $story->parent, 'deleteChildrenStory', '', $storyID); } $this->executeHooks($storyID); @@ -2200,8 +2200,8 @@ class story extends control */ public function batchChangeBranch($branchID, $confirm = '', $storyIdList = '', $storyType = 'story') { - if(empty($_POST['storyIdList'])) return print(js::locate($this->session->storyList, 'parent')); - $storyIdList = $this->post->storyIdList; + if(empty($storyIdList) and empty($_POST['storyIdList'])) return print(js::locate($this->session->storyList, 'parent')); + if(!empty($_POST['storyIdList'])) $storyIdList = $this->post->storyIdList; $plans = $this->loadModel('productplan')->getPlansByStories($storyIdList); if(empty($confirm)) { @@ -2466,7 +2466,6 @@ class story extends control /* Get story, product, products, and queryID. */ $story = $this->story->getById($storyID); $products = $this->product->getPairs('', 0, '', 'all'); - $queryID = 0; $product = $this->product->getByID($story->product); /* Change for requirement story title. */ diff --git a/module/tree/model.php b/module/tree/model.php index 966a38da52..3197a24d5e 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -9,8 +9,6 @@ * @version $Id: model.php 5149 2013-07-16 01:47:01Z zhujinyonging@gmail.com $ * @link http://www.zentao.net */ -?> -