// | https://www.anuko.com/time_tracker/credits.htm
// +----------------------------------------------------------------------+
-import('ttTeamHelper');
import('ttUserHelper');
import('ttGroupHelper');
}
// Bind the project to tasks in tt_project_task_binds table.
- $all_tasks = ttTeamHelper::getAllTasks($group_id);
- foreach ($all_tasks as $task) {
+ $active_tasks = ttGroupHelper::getActiveTasks();
+ foreach ($active_tasks as $task) {
if(in_array($task['id'], $tasks)) {
$sql = "insert into tt_project_task_binds (project_id, task_id, group_id, org_id)".
" values($last_id, ".$task['id'].", $group_id, $org_id)";
return false;
}
- // The getAllTasks obtains all tasks in a group.
- static function getAllTasks($group_id, $all_fields = false) {
- $mdb2 = getConnection();
-
- if ($all_fields)
- $sql = "select * from tt_tasks where group_id = $group_id order by status, upper(name)";
- else
- $sql = "select id, name from tt_tasks where group_id = $group_id order by status, upper(name)";
- $res = $mdb2->query($sql);
- $result = array();
- if (!is_a($res, 'PEAR_Error')) {
- while ($val = $res->fetchRow()) {
- $result[] = $val;
- }
- return $result;
- }
- return false;
- }
-
// getActiveRolesForUser - returns an array of relevant active roles for user with rank less than self.
// "Relevant" means that client roles are filtered out if Client plugin is disabled.
static function getActiveRolesForUser()
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.18.29.4625 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.29.4626 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>