Update project.class.php

This commit is contained in:
Laurent Destailleur 2018-08-21 13:10:20 +02:00 committed by GitHub
parent 3523c2b3d2
commit 91bfa4be6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -714,14 +714,15 @@ class Project extends CommonObject
/**
* Delete tasks with no children first, then task with children recursively
*
* @param int <0 if KO, 1 if OK
* @param User $user User
* @return int <0 if KO, 1 if OK
*/
function deleteTasks($user)
{
$countTasks = count($this->lines);
$deleted = false;
if ($countTasks)
{
{
foreach($this->lines as $task)
{
if ($task->hasChildren() <= 0) { // If there is no children (or error to detect them)