From d9dfd9d6199b15eba9510ef460e18c9245d9ab12 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sun, 30 Mar 2014 19:53:59 -0400 Subject: Add Mysql/MariaDB support --- controllers/task.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'controllers/task.php') diff --git a/controllers/task.php b/controllers/task.php index 7aefb98c..16075ec2 100644 --- a/controllers/task.php +++ b/controllers/task.php @@ -186,6 +186,11 @@ class Task extends Base if (! empty($task['date_due'])) { $task['date_due'] = date(t('m/d/Y'), $task['date_due']); } + else { + $task['date_due'] = ''; + } + + $task['score'] = $task['score'] ?: ''; $this->response->html($this->template->layout('task_edit', array( 'errors' => array(), @@ -324,6 +329,15 @@ class Task extends Base if (! $task) $this->notfound(); $this->checkProjectPermissions($task['project_id']); + if (! empty($task['date_due'])) { + $task['date_due'] = date(t('m/d/Y'), $task['date_due']); + } + else { + $task['date_due'] = ''; + } + + $task['score'] = $task['score'] ?: ''; + $this->response->html($this->template->layout('task_new', array( 'errors' => array(), 'values' => $task, -- cgit v1.2.3