Project cloning/duplication (pull-request #196)

This commit is contained in:
Frédéric Guillot
2014-08-12 12:03:15 -07:00
parent 9f46120de9
commit 66b5659578
12 changed files with 264 additions and 1 deletions

View File

@@ -13,6 +13,27 @@ use Core\Translator;
*/
class Project extends Base
{
/**
* Clone Project
*
* @author Antonio Rabelo
* @access public
*/
public function duplicate()
{
$this->checkCSRFParam();
$project_id = $this->request->getIntegerParam('project_id');
if ($project_id && $this->project->duplicate($project_id)) {
$this->session->flash(t('Project cloned successfully.'));
} else {
$this->session->flashError(t('Unable to clone this project.'));
}
$this->response->redirect('?controller=project');
}
/**
* Task export
*