diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-11-09 12:47:49 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-11-09 12:47:49 -0500 |
commit | 3df63e051fac84cec98c912668722f87d6e8183e (patch) | |
tree | 648a92db37f3295669ae6cc59126fc003235cfa8 /app/Controller/Project.php | |
parent | e0117cb8ed6326e8c77a02ce265c2b5f195e08d8 (diff) |
Add projects to the dashboard and rename some methods
Diffstat (limited to 'app/Controller/Project.php')
-rw-r--r-- | app/Controller/Project.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/Controller/Project.php b/app/Controller/Project.php index bdc382f7..a479b1d6 100644 --- a/app/Controller/Project.php +++ b/app/Controller/Project.php @@ -146,7 +146,7 @@ class Project extends Base public function update() { $project = $this->getProjectManagement(); - $values = $this->request->getValues() + array('is_active' => 0); + $values = $this->request->getValues(); list($valid, $errors) = $this->project->validateModification($values); if ($valid) { @@ -527,9 +527,11 @@ class Project extends Base if ($valid) { - if ($this->project->create($values, $this->acl->getUserId())) { + $project_id = $this->project->create($values, $this->acl->getUserId()); + + if ($project_id) { $this->session->flash(t('Your project have been created successfully.')); - $this->response->redirect('?controller=project'); + $this->response->redirect('?controller=project&action=show&project_id='.$project_id); } else { $this->session->flashError(t('Unable to create your project.')); |