From e5ea36125536b5ac8f8a7e31c2602e9bd1b52075 Mon Sep 17 00:00:00 2001 From: Michael Lüpkes Date: Tue, 3 Feb 2015 11:16:10 +0100 Subject: Implemented Changes to Project Duplication to include Swimlanes and Tasks. ProjectDuplication::duplicate accepts additional param of type array now. Array includes which optional parts to duplicate. Optional parts are: 'swimlane', 'category', 'task', 'action'. --- app/Controller/Project.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'app/Controller') diff --git a/app/Controller/Project.php b/app/Controller/Project.php index 8178ab5f..842ed6e8 100644 --- a/app/Controller/Project.php +++ b/app/Controller/Project.php @@ -297,7 +297,7 @@ class Project extends Base /** * Duplicate a project * - * @author Antonio Rabelo + * @author Antonio Rabelo & Michael Lüpkes * @access public */ public function duplicate() @@ -305,10 +305,8 @@ class Project extends Base $project = $this->getProject(); if ($this->request->getStringParam('duplicate') === 'yes') { - - $this->checkCSRFParam(); - - if ($this->projectDuplication->duplicate($project['id'])) { + $values = array_keys($this->request->getValues()); + if ($this->projectDuplication->duplicate($project['id'], $values)) { $this->session->flash(t('Project cloned successfully.')); } else { $this->session->flashError(t('Unable to clone this project.')); -- cgit v1.2.3