summaryrefslogtreecommitdiff
path: root/app/Controller
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-09-10 16:21:47 +0200
committerFrédéric Guillot <fred@kanboard.net>2014-09-10 16:21:47 +0200
commit28ff8dad91c9e3c25f6a3b5398ae15f2a1ef95cd (patch)
tree0cecc5cbb6e7e6795dd032cc6a5703cd88b8770e /app/Controller
parent9bde377bbe85617dde280af985e033cf7de61803 (diff)
Add subtasks and comments history
Diffstat (limited to 'app/Controller')
-rw-r--r--app/Controller/Base.php30
-rw-r--r--app/Controller/Project.php1
2 files changed, 25 insertions, 6 deletions
diff --git a/app/Controller/Base.php b/app/Controller/Base.php
index 4f920ab0..00bfb79b 100644
--- a/app/Controller/Base.php
+++ b/app/Controller/Base.php
@@ -28,6 +28,8 @@ use Model\LastLogin;
* @property \Model\SubTask $subTask
* @property \Model\Task $task
* @property \Model\TaskHistory $taskHistory
+ * @property \Model\CommentHistory $commentHistory
+ * @property \Model\SubtaskHistory $subtaskHistory
* @property \Model\User $user
* @property \Model\Webhook $webhook
*/
@@ -131,11 +133,29 @@ abstract class Base
}
// Attach events
- $this->action->attachEvents();
- $this->project->attachEvents();
- $this->webhook->attachEvents();
- $this->notification->attachEvents();
- $this->taskHistory->attachEvents();
+ $this->attachEvents();
+ }
+
+ /**
+ * Attach events
+ *
+ * @access private
+ */
+ private function attachEvents()
+ {
+ $models = array(
+ 'action',
+ 'project',
+ 'webhook',
+ 'notification',
+ 'taskHistory',
+ 'commentHistory',
+ 'subtaskHistory',
+ );
+
+ foreach ($models as $model) {
+ $this->$model->attachEvents();
+ }
}
/**
diff --git a/app/Controller/Project.php b/app/Controller/Project.php
index 26b241b9..6356a9c6 100644
--- a/app/Controller/Project.php
+++ b/app/Controller/Project.php
@@ -72,7 +72,6 @@ class Project extends Base
$to = $this->request->getStringParam('to');
if ($from && $to) {
- Translator::disableEscaping();
$data = $this->task->export($project['id'], $from, $to);
$this->response->forceDownload('Export_'.date('Y_m_d_H_i_S').'.csv');
$this->response->csv($data);