Skip to content

Commit

Permalink
fix log entry when deleting task
Browse files Browse the repository at this point in the history
  • Loading branch information
philippK-de committed Oct 12, 2016
1 parent 4eb06bf commit 61abfe3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions include/class.task.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ function del($id)
$id = (int)$id;
// get task text and project
// we need to do this before deleting the task here
$projectProperties = $this->getProjectProperties($id);

$delStmt = $conn->prepare("DELETE FROM tasks WHERE ID = ?");
$del = $delStmt->execute(array($id));
Expand All @@ -112,8 +113,6 @@ function del($id)
$delAssignStmt = $conn->prepare("DELETE FROM tasks_assigned WHERE task = ?");
$delAssign = $delAssignStmt->execute(array($id));
// Add a log entry with the task text
$projectProperties = $this->getProjectProperties($id);

$mylog->add($projectProperties[0], 'task', 3, $projectProperties[1]);
return true;
} else {
Expand Down Expand Up @@ -305,6 +304,9 @@ function getTask($id)
$task["istoday"] = true;
}

//$taskCommentObj = new taskComments();
//$task["comments"] = $taskCommentObj->getCommentsByTask($id);

return $task;
} else {
return false;
Expand Down
4 changes: 4 additions & 0 deletions include/js/viewManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,10 @@ function deleteElement(theElement, theUrl, theView) {
}
var result = true;
}
else
{
console.log(ajax.request.responseText);
}
});

ajax.sendRequest();
Expand Down
2 changes: 1 addition & 1 deletion include/js/viewManager.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 61abfe3

Please sign in to comment.