* fix for sonar.

This commit is contained in:
wangyidong
2023-03-27 11:34:22 +08:00
parent e59c7e0999
commit c87ea9131a
2 changed files with 5 additions and 8 deletions
+3 -4
View File
@@ -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. */
+2 -4
View File
@@ -9,8 +9,6 @@
* @version $Id: model.php 5149 2013-07-16 01:47:01Z zhujinyonging@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php
class treeModel extends model
{
/**
@@ -204,7 +202,7 @@ class treeModel extends model
}
ksort($treeMenu);
$topMenu = @array_shift($treeMenu);
$topMenu = array_shift($treeMenu);
$topMenu = explode("\n", trim((string)$topMenu));
$lastMenu[] = '/';
foreach($topMenu as $menu)
@@ -348,7 +346,7 @@ class treeModel extends model
}
ksort($treeMenu);
$topMenu = @array_shift($treeMenu);
$topMenu = array_shift($treeMenu);
$topMenu = explode("\n", trim((string)$topMenu));
foreach($topMenu as $menu)
{