$this->taskMap[$this->currentElement['ID']] =
ttTaskHelper::insert(array(
'group_id' => $this->group_id,
+ 'org_id' => $this->org_id,
'name' => $this->currentElement['NAME'],
'description' => $this->currentElement['DESCRIPTION'],
'status' => $this->currentElement['STATUS']));
$this->projectMap[$this->currentElement['ID']] =
ttProjectHelper::insert(array(
'group_id' => $this->group_id,
+ 'org_id' => $this->org_id,
'name' => $this->currentElement['NAME'],
'description' => $this->currentElement['DESCRIPTION'],
'tasks' => $mapped_tasks,
$mdb2 = getConnection();
$group_id = (int) $fields['group_id'];
+ $org_id = (int) $fields['org_id'];
$name = $fields['name'];
$description = $fields['description'];
$comma_separated = implode(',', $tasks); // This is a comma-separated list of associated task ids.
$status = $fields['status'];
- $sql = "insert into tt_projects (group_id, name, description, tasks, status)
- values ($group_id, ".$mdb2->quote($name).", ".$mdb2->quote($description).", ".$mdb2->quote($comma_separated).", ".$mdb2->quote($status).")";
+ $sql = "insert into tt_projects (group_id, org_id, name, description, tasks, status)
+ values ($group_id, $org_id, ".$mdb2->quote($name).", ".$mdb2->quote($description).", ".$mdb2->quote($comma_separated).", ".$mdb2->quote($status).")";
$affected = $mdb2->exec($sql);
if (is_a($affected, 'PEAR_Error'))
return false;
$mdb2 = getConnection();
$group_id = (int) $fields['group_id'];
+ $org_id = (int) $fields['org_id'];
$name = $fields['name'];
$description = $fields['description'];
$projects = $fields['projects'];
$status = $fields['status'];
- $sql = "insert into tt_tasks (group_id, name, description, status)
- values ($group_id, ".$mdb2->quote($name).", ".$mdb2->quote($description).", ".$mdb2->quote($status).")";
+ $sql = "insert into tt_tasks (group_id, org_id, name, description, status)
+ values ($group_id, $org_id, ".$mdb2->quote($name).", ".$mdb2->quote($description).", ".$mdb2->quote($status).")";
$affected = $mdb2->exec($sql);
$last_id = 0;
if (is_a($affected, 'PEAR_Error'))
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.18.10.4382 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.10.4383 | 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>
setChange("ALTER TABLE `tt_projects` ADD `org_id` int(11) default NULL AFTER `group_id`");
setChange("ALTER TABLE `tt_tasks` ADD `org_id` int(11) default NULL AFTER `group_id`");
setChange("UPDATE `tt_site_config` SET param_value = '1.18.10', modified = now() where param_name = 'version_db' and param_value = '1.18.09'");
+ setChange("UPDATE `tt_projects` inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.18.10') set org_id = group_id where org_id is null");
+ setChange("UPDATE `tt_tasks` inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.18.10') set org_id = group_id where org_id is null");
}
if ($_POST["cleanup"]) {
if ($err->no()) {
if (!ttProjectHelper::getProjectByName($cl_name)) {
if (ttProjectHelper::insert(array(
- 'group_id' => $user->group_id,
+ 'group_id' => $user->getActiveGroup(),
+ 'org_id' => $user->org_id,
'name' => $cl_name,
'description' => $cl_description,
'users' => $cl_users,
if ($request->getParameter('btn_copy')) {
if (!ttProjectHelper::getProjectByName($cl_name)) {
if (ttProjectHelper::insert(array(
- 'group_id' => $user->group_id,
+ 'group_id' => $user->getActiveGroup(),
+ 'org_id' => $user->org_id,
'name' => $cl_name,
'description' => $cl_description,
'users' => $cl_users,
if ($err->no()) {
if (!ttTaskHelper::getTaskByName($cl_name)) {
if (ttTaskHelper::insert(array(
- 'group_id' => $user->group_id,
+ 'group_id' => $user->getActiveGroup(),
+ 'org_id' => $user->org_id,
'name' => $cl_name,
'description' => $cl_description,
'status' => ACTIVE,
if ($request->getParameter('btn_copy')) {
if (!ttTaskHelper::getTaskByName($cl_name)) {
if (ttTaskHelper::insert(array(
- 'group_id' => $user->group_id,
+ 'group_id' => $user->getActiveGroup(),
+ 'org_id' => $user->org_id,
'name' => $cl_name,
'description' => $cl_description,
'status' => $cl_status,
if ($err->no()) {
if (!ttProjectHelper::getProjectByName($cl_name)) {
if (ttProjectHelper::insert(array(
- 'group_id' => $user->group_id,
+ 'group_id' => $user->getActiveGroup(),
+ 'org_id' => $user->org_id,
'name' => $cl_name,
'description' => $cl_description,
'users' => $cl_users,
if ($request->getParameter('btn_copy')) {
if (!ttProjectHelper::getProjectByName($cl_name)) {
if (ttProjectHelper::insert(array(
- 'group_id' => $user->group_id,
+ 'group_id' => $user->getActiveGroup(),
+ 'org_id' => $user->org_id,
'name' => $cl_name,
'description' => $cl_description,
'users' => $cl_users,
if ($err->no()) {
if (!ttTaskHelper::getTaskByName($cl_name)) {
if (ttTaskHelper::insert(array(
- 'group_id' => $user->group_id,
+ 'group_id' => $user->getActiveGroup(),
+ 'org_id' => $user->org_id,
'name' => $cl_name,
'description' => $cl_description,
'status' => ACTIVE,
if ($request->getParameter('btn_copy')) {
if (!ttTaskHelper::getTaskByName($cl_name)) {
if (ttTaskHelper::insert(array(
- 'group_id' => $user->group_id,
+ 'group_id' => $user->getActiveGroup(),
+ 'org_id' => $user->org_id,
'name' => $cl_name,
'description' => $cl_description,
'status' => $cl_status,