Update project.class.php
This commit is contained in:
parent
3523c2b3d2
commit
91bfa4be6c
@ -714,14 +714,15 @@ class Project extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Delete tasks with no children first, then task with children recursively
|
* 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)
|
function deleteTasks($user)
|
||||||
{
|
{
|
||||||
$countTasks = count($this->lines);
|
$countTasks = count($this->lines);
|
||||||
$deleted = false;
|
$deleted = false;
|
||||||
if ($countTasks)
|
if ($countTasks)
|
||||||
{
|
{
|
||||||
foreach($this->lines as $task)
|
foreach($this->lines as $task)
|
||||||
{
|
{
|
||||||
if ($task->hasChildren() <= 0) { // If there is no children (or error to detect them)
|
if ($task->hasChildren() <= 0) { // If there is no children (or error to detect them)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user