// insert function inserts a new project into database.
static function insert($fields)
{
+ global $user;
$mdb2 = getConnection();
- $group_id = (int) $fields['group_id'];
- $org_id = (int) $fields['org_id'];
+ $group_id = $user->getGroup();
+ $org_id = $user->org_id;
$name = $fields['name'];
$description = $fields['description'];
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <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> |
+ <td align="center"> Anuko Time Tracker 1.18.29.4623 | 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>
if ($err->no()) {
if (!ttProjectHelper::getProjectByName($cl_name)) {
- if (ttProjectHelper::insert(array(
- 'group_id' => $user->getGroup(),
- 'org_id' => $user->org_id,
- 'name' => $cl_name,
+ if (ttProjectHelper::insert(array('name' => $cl_name,
'description' => $cl_description,
'users' => $cl_users,
'tasks' => $cl_tasks,
if ($request->getParameter('btn_copy')) {
if (!ttProjectHelper::getProjectByName($cl_name)) {
- if (ttProjectHelper::insert(array(
- 'group_id' => $user->getGroup(),
- 'org_id' => $user->org_id,
- 'name' => $cl_name,
+ if (ttProjectHelper::insert(array('name' => $cl_name,
'description' => $cl_description,
'users' => $cl_users,
'tasks' => $cl_tasks,
if ($err->no()) {
if (!ttProjectHelper::getProjectByName($cl_name)) {
- if (ttProjectHelper::insert(array(
- 'group_id' => $user->getGroup(),
- 'org_id' => $user->org_id,
- 'name' => $cl_name,
+ if (ttProjectHelper::insert(array('name' => $cl_name,
'description' => $cl_description,
'users' => $cl_users,
'tasks' => $cl_tasks,
if ($request->getParameter('btn_copy')) {
if (!ttProjectHelper::getProjectByName($cl_name)) {
- if (ttProjectHelper::insert(array(
- 'group_id' => $user->getGroup(),
- 'org_id' => $user->org_id,
- 'name' => $cl_name,
+ if (ttProjectHelper::insert(array('name' => $cl_name,
'description' => $cl_description,
'users' => $cl_users,
'tasks' => $cl_tasks,