Reducing the complexity of ProjectController::add()
This commit is contained in:
parent
f561cd636a
commit
87ee8efaf8
|
@ -227,10 +227,6 @@ class ProjectController extends \PHPCI\Controller
|
|||
|
||||
$this->config->set('page_title', 'Edit: ' . $project->getTitle());
|
||||
|
||||
|
||||
if ($method == 'POST') {
|
||||
$values = $this->getParams();
|
||||
} else {
|
||||
$values = $project->getDataArray();
|
||||
$values['key'] = $values['git_key'];
|
||||
$values['pubkey'] = $values['public_key'];
|
||||
|
@ -240,8 +236,10 @@ class ProjectController extends \PHPCI\Controller
|
|||
$reference = $accessInfo["user"].'@'.$accessInfo["domain"].':' . $project->getReference().".git";
|
||||
$values['reference'] = $reference;
|
||||
}
|
||||
}
|
||||
|
||||
if ($method == 'POST') {
|
||||
$values = $this->getParams();
|
||||
}
|
||||
|
||||
$form = $this->projectForm($values, 'edit/' . $projectId);
|
||||
|
||||
|
|
Loading…
Reference in a new issue