} // prepare (and translate) the module name ready for the suffix if ($del) { $result = $obj->delete(); if (is_array($result)) { $AppUI->setMsg($msg, UI_MSG_ERROR); $AppUI->redirect(); } else { $AppUI->setMsg('Task deleted'); $AppUI->redirect('', -1); } } $result = $obj->store($AppUI); if ($taskRecount) { $myTask = new CTask(); CProject::updateTaskCount($taskRecount, $myTask->getTaskCount($taskRecount)); } //$obj->task_project if (is_array($result)) { $AppUI->setMsg($result, UI_MSG_ERROR, true); $AppUI->holdObject($obj); $AppUI->redirect('m=tasks&a=addedit'); } if ($result) { $task_parent = (int) w2PgetParam($_POST, 'task_parent', 0); $old_task_parent = (int) w2PgetParam($_POST, 'old_task_parent', 0); if ($task_parent != $old_task_parent) { $oldTask = new CTask(); $oldTask->load($old_task_parent); $oldTask->updateDynamics(false); }
/** * @deprecated */ public static function hasTasks($projectId, $override = null) { trigger_error("CProject::hasTasks() has been deprecated in v3.0 and will be removed in v4.0. Please use CTask->getTaskCount() instead.", E_USER_NOTICE); $task = new CTask(); $task->overrideDatabase($override); return $task->getTaskCount($projectId); }