}
// delete - deletes a record from tt_log table and its associated custom field values.
- static function delete($id, $user_id) {
+ static function delete($id) {
+ global $user;
$mdb2 = getConnection();
- $sql = "update tt_log set status = NULL where id = $id and user_id = $user_id";
+ $user_id = $user->getUser();
+ $group_id = $user->getGroup();
+ $org_id = $user->org_id;
+
+ $sql = "update tt_log set status = null".
+ " where id = $id and user_id = $user_id and group_id = $group_id and org_id = $org_id";
$affected = $mdb2->exec($sql);
if (is_a($affected, 'PEAR_Error'))
return false;
- $sql = "update tt_custom_field_log set status = NULL where log_id = $id";
+ $sql = "update tt_custom_field_log set status = null".
+ " where log_id = $id and group_id = $group_id and org_id = $org_id";
$affected = $mdb2->exec($sql);
if (is_a($affected, 'PEAR_Error'))
return false;
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.18.29.4568 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.29.4569 | 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()) {
// Delete the record.
- if (ttTimeHelper::delete($cl_id, $user_id)) {
+ if (ttTimeHelper::delete($cl_id)) {
header('Location: time.php');
exit();
} else {
if ($err->no()) {
// Delete the record.
- if (ttTimeHelper::delete($cl_id, $user_id)) {
+ if (ttTimeHelper::delete($cl_id)) {
header('Location: time.php');
exit();
} else {