summaryrefslogtreecommitdiff
path: root/controllers/task.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fguillot@users.noreply.github.com>2014-03-23 22:10:43 -0400
committerFrédéric Guillot <fguillot@users.noreply.github.com>2014-03-23 22:10:43 -0400
commit0d55f5aa35d21b79c5d79f7214c4c9e05b1d2684 (patch)
tree3a70e8fbf58dcbe93df0597f70a1f0bb893e5f40 /controllers/task.php
parentab63ffafc565e75c73c27910abd465bebb09306e (diff)
Comment edit/remove actions
Diffstat (limited to 'controllers/task.php')
-rw-r--r--controllers/task.php73
1 files changed, 0 insertions, 73 deletions
diff --git a/controllers/task.php b/controllers/task.php
index 0dae014e..7aefb98c 100644
--- a/controllers/task.php
+++ b/controllers/task.php
@@ -52,46 +52,6 @@ class Task extends Base
}
/**
- * Display the template show task, common between different task view
- *
- * @access public
- */
- private function showTask(array $task, array $comment_form = array(), array $description_form = array())
- {
- if (empty($comment_form)) {
-
- $comment_form = array(
- 'values' => array(
- 'task_id' => $task['id'],
- 'user_id' => $this->acl->getUserId()
- ),
- 'errors' => array()
- );
- }
-
- if (empty($description_form)) {
-
- $description_form = array(
- 'values' => array(
- 'id' => $task['id'],
- ),
- 'errors' => array()
- );
- }
-
- $this->response->html($this->template->layout('task_show', array(
- 'comment_form' => $comment_form,
- 'description_form' => $description_form,
- 'comments' => $this->comment->getAll($task['id']),
- 'task' => $task,
- 'columns_list' => $this->board->getColumnsList($task['project_id']),
- 'colors_list' => $this->task->getColors(),
- 'menu' => 'tasks',
- 'title' => $task['title'],
- )));
- }
-
- /**
* Show a task
*
* @access public
@@ -107,39 +67,6 @@ class Task extends Base
}
/**
- * Add a comment
- *
- * @access public
- */
- public function comment()
- {
- $task = $this->task->getById($this->request->getIntegerParam('task_id'), true);
- $values = $this->request->getValues();
-
- if (! $task) $this->notfound();
- $this->checkProjectPermissions($task['project_id']);
-
- list($valid, $errors) = $this->comment->validateCreation($values);
-
- if ($valid) {
-
- if ($this->comment->create($values)) {
- $this->session->flash(t('Comment added successfully.'));
- }
- else {
- $this->session->flashError(t('Unable to create your comment.'));
- }
-
- $this->response->redirect('?controller=task&action=show&task_id='.$task['id']);
- }
-
- $this->showTask(
- $task,
- array('values' => $values, 'errors' => $errors)
- );
- }
-
- /**
* Add a description from the show task page
*
* @access public