summaryrefslogtreecommitdiff
path: root/app/Controller/Project.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-01-24 18:15:21 -0500
committerFrederic Guillot <fred@kanboard.net>2016-01-24 18:15:21 -0500
commitabcfd02067b348e1c86f61e7545b93f87ea89569 (patch)
tree88af1382f729659dd8bcdb1669653da827c19d29 /app/Controller/Project.php
parent4fa38bf417dd7f1673f63641460092bd046d57b7 (diff)
Split project edition into multiple pages
Diffstat (limited to 'app/Controller/Project.php')
-rw-r--r--app/Controller/Project.php52
1 files changed, 0 insertions, 52 deletions
diff --git a/app/Controller/Project.php b/app/Controller/Project.php
index 836bfb45..ffd62b09 100644
--- a/app/Controller/Project.php
+++ b/app/Controller/Project.php
@@ -133,58 +133,6 @@ class Project extends Base
}
/**
- * Display a form to edit a project
- *
- * @access public
- */
- public function edit(array $values = array(), array $errors = array())
- {
- $project = $this->getProject();
-
- $this->response->html($this->projectLayout('project/edit', array(
- 'values' => empty($values) ? $project : $values,
- 'errors' => $errors,
- 'project' => $project,
- 'owners' => $this->projectUserRole->getAssignableUsersList($project['id'], true),
- 'title' => t('Edit project')
- )));
- }
-
- /**
- * Validate and update a project
- *
- * @access public
- */
- public function update()
- {
- $project = $this->getProject();
- $values = $this->request->getValues();
-
- if (isset($values['is_private'])) {
- if (! $this->helper->user->hasProjectAccess('project', 'create', $project['id'])) {
- unset($values['is_private']);
- }
- } elseif ($project['is_private'] == 1 && ! isset($values['is_private'])) {
- if ($this->helper->user->hasProjectAccess('project', 'create', $project['id'])) {
- $values += array('is_private' => 0);
- }
- }
-
- list($valid, $errors) = $this->projectValidator->validateModification($values);
-
- if ($valid) {
- if ($this->project->update($values)) {
- $this->flash->success(t('Project updated successfully.'));
- $this->response->redirect($this->helper->url->to('project', 'edit', array('project_id' => $project['id'])));
- } else {
- $this->flash->failure(t('Unable to update this project.'));
- }
- }
-
- $this->edit($values, $errors);
- }
-
- /**
* Remove a project
*
* @access public