summaryrefslogtreecommitdiff
path: root/app/Controller/Action.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-10-05 19:40:57 -0400
committerFrédéric Guillot <fred@kanboard.net>2014-10-05 19:40:57 -0400
commitd138834dcf902534f78237939926e97fd9a0eebe (patch)
treea6247b9ed98079899c9e21d43044030b69088bee /app/Controller/Action.php
parent7f5a871f84639a90eebd0ac1d0ee7f759e220cf6 (diff)
Regular users are able to create private projects
Diffstat (limited to 'app/Controller/Action.php')
-rw-r--r--app/Controller/Action.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/app/Controller/Action.php b/app/Controller/Action.php
index 44ab6430..714c87f3 100644
--- a/app/Controller/Action.php
+++ b/app/Controller/Action.php
@@ -17,7 +17,7 @@ class Action extends Base
*/
public function index()
{
- $project = $this->getProject();
+ $project = $this->getProjectManagement();
$this->response->html($this->projectLayout('action_index', array(
'values' => array('project_id' => $project['id']),
@@ -43,7 +43,7 @@ class Action extends Base
*/
public function event()
{
- $project = $this->getProject();
+ $project = $this->getProjectManagement();
$values = $this->request->getValues();
if (empty($values['action_name']) || empty($values['project_id'])) {
@@ -66,7 +66,7 @@ class Action extends Base
*/
public function params()
{
- $project = $this->getProject();
+ $project = $this->getProjectManagement();
$values = $this->request->getValues();
if (empty($values['action_name']) || empty($values['project_id']) || empty($values['event_name'])) {
@@ -104,7 +104,7 @@ class Action extends Base
*/
public function create()
{
- $this->doCreation($this->getProject(), $this->request->getValues());
+ $this->doCreation($this->getProjectManagement(), $this->request->getValues());
}
/**
@@ -138,7 +138,7 @@ class Action extends Base
*/
public function confirm()
{
- $project = $this->getProject();
+ $project = $this->getProjectManagement();
$this->response->html($this->projectLayout('action_remove', array(
'action' => $this->action->getById($this->request->getIntegerParam('action_id')),
@@ -158,6 +158,7 @@ class Action extends Base
public function remove()
{
$this->checkCSRFParam();
+ $project = $this->getProjectManagement();
$action = $this->action->getById($this->request->getIntegerParam('action_id'));
if ($action && $this->action->remove($action['id'])) {
@@ -166,6 +167,6 @@ class Action extends Base
$this->session->flashError(t('Unable to remove this action.'));
}
- $this->response->redirect('?controller=action&action=index&project_id='.$action['project_id']);
+ $this->response->redirect('?controller=action&action=index&project_id='.$project['id']);
}
}