function deepMove($destProject_id = 0, $destTask_id = 0)
 {
     $children = $this->getChildren();
     $this->move($destProject_id, $destTask_id);
     if (!empty($children)) {
         foreach ($children as $child) {
             $tempChild = new CTask();
             $tempChild->peek($child);
             $tempChild->htmlDecode($child);
             $tempChild->deepMove($destProject_id, $this->task_id);
             $tempChild->store();
         }
     }
     $this->store();
 }
Exemple #2
0
     $t->delete();
     //Now task deletion deletes children no matter what.
     /*
     //delete children
     if (isset($children)) {
     	foreach($children as $child) {
     		$t->load($child);
     		$t->delete();
     	}
     }
     */
 } else {
     if ($action == 'm') {
         //move task
         if (isset($children)) {
             $t->deepMove($new_project, $new_task);
         } else {
             $t->move($new_project, $new_task);
         }
         $t->store();
     } else {
         if ($action == 'c') {
             //copy task
             if (isset($children)) {
                 $t2 = $t->deepCopy($new_project, $new_task);
             } else {
                 $t2 = $t->copy($new_project, $new_task);
             }
             $t2->store();
         } else {
             if ($action > -2 && $action < 2) {