Merge pull request #464 from bweston92/master

SSH issues.
This commit is contained in:
Steve B 2014-06-27 14:55:41 +01:00
commit 4a7495a75d
2 changed files with 4 additions and 4 deletions

View file

@ -166,9 +166,9 @@ class ProjectController extends \PHPCI\Controller
$sshKey = new SshKey();
$key = $sshKey->generate();
$values['key'] = $key ? $key['private_key'] : '';
$values['pubkey'] = $key ? $key['public_key'] : '';
$pub = $key ? $key['public_key'] : '';
$values['key'] = isset($key['private_key']) ? $key['private_key'] : '';
$values['pubkey'] = isset($key['public_key']) ? $key['public_key'] : '';
$pub = isset($key['public_key']) ? $key['public_key'] : '';
}
$form = $this->projectForm($values);

View file

@ -45,7 +45,7 @@ class SshKey
public function canGenerateKeys()
{
$keygen = @shell_exec('ssh-keygen');
$keygen = @shell_exec('ssh-keygen -h');
$canGenerateKeys = !empty($keygen);
return $canGenerateKeys;