}
return $result;
}
+
+ // getInactiveTasks - returns an array of inactive tasks for a group.
+ static function getInactiveTasks()
+ {
+ global $user;
+ $mdb2 = getConnection();
+
+ $group_id = $user->getGroup();
+ $org_id = $user->org_id;
+
+ $sql = "select id, name, description from tt_tasks".
+ " where group_id = $group_id and org_id = $org_id and status = 0 order by upper(name)";
+ $res = $mdb2->query($sql);
+ $result = array();
+ if (!is_a($res, 'PEAR_Error')) {
+ while ($val = $res->fetchRow()) {
+ $result[] = $val;
+ }
+ }
+ return $result;
+ }
}
return false;
}
- // getInactiveTasks - returns an array of inactive tasks for a group.
- static function getInactiveTasks($group_id)
- {
- $result = array();
- $mdb2 = getConnection();
-
- $sql = "select id, name, description from tt_tasks
- where group_id = $group_id and status = 0 order by upper(name)";
- $res = $mdb2->query($sql);
- $result = array();
- if (!is_a($res, 'PEAR_Error')) {
- while ($val = $res->fetchRow()) {
- $result[] = $val;
- }
- }
- return $result;
- }
-
// The getAllTasks obtains all tasks in a group.
static function getAllTasks($group_id, $all_fields = false) {
$mdb2 = getConnection();
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.18.29.4621 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.29.4622 | 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>
require_once('../initialize.php');
import('form.Form');
-import('ttTeamHelper');
import('ttGroupHelper');
// Access checks.
if($user->can('manage_tasks')) {
$active_tasks = ttGroupHelper::getActiveTasks();
- $inactive_tasks = ttTeamHelper::getInactiveTasks($user->getGroup());
+ $inactive_tasks = ttGroupHelper::getInactiveTasks();
} else
$active_tasks = $user->getAssignedTasks();
require_once('initialize.php');
import('form.Form');
-import('ttTeamHelper');
import('ttGroupHelper');
// Access checks.
if($user->can('manage_tasks')) {
$active_tasks = ttGroupHelper::getActiveTasks();
- $inactive_tasks = ttTeamHelper::getInactiveTasks($group_id);
+ $inactive_tasks = ttGroupHelper::getInactiveTasks();
} else
$active_tasks = $user->getAssignedTasks();