From 3d84adbd7635e772d9d38da435a6e00c9c37d6cd Mon Sep 17 00:00:00 2001 From: atm-greg Date: Thu, 9 Aug 2018 12:21:48 +0200 Subject: [PATCH] fix recurcivity --- htdocs/projet/class/project.class.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 6710aa98ffc..2292487898d 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -719,14 +719,12 @@ class Project extends CommonObject { global $user; - $arrParents = array(); foreach($arr as $task) { - if($task->hasChildren() < 0) $task->delete($user); - else $arrParents[] = $task; + if($task->hasChildren() <= 0) $task->delete($user); } - - if (count($arrParents)) $this->deleteTasks($arrParents); + $this->getLinesArray($user); + if (count($this->lines)) $this->deleteTasks($this->lines); } /**