|
|
@ -91,12 +91,12 @@ class NginxVhostFactory |
|
|
|
->disableDefaultItems() |
|
|
|
|
|
|
|
// edit configuration
|
|
|
|
->addItem('edit', function(CliMenu $menu) use ($vhost) { |
|
|
|
->addItem('edit', function(CliMenu $menu) use (&$vhost) { |
|
|
|
system('nano /etc/nginx/sites-available/'.$vhost['file'].' > `tty`'); |
|
|
|
}) |
|
|
|
|
|
|
|
// delete configuration
|
|
|
|
->addItem('delete', function(CliMenu $menu) use ($vhost) { |
|
|
|
->addItem('delete', function(CliMenu $menu) use (&$vhost) { |
|
|
|
|
|
|
|
if ($vhost['enabled'] === true) { |
|
|
|
$menu->flash('Please disable first!')->display(); |
|
|
@ -166,10 +166,10 @@ class NginxVhostFactory |
|
|
|
* @param [type] $vhost |
|
|
|
* @return [type] |
|
|
|
*/ |
|
|
|
private function createVhostCheckbox($vhost) |
|
|
|
private function createVhostCheckbox(&$vhost) |
|
|
|
{ |
|
|
|
// create checkbox for enabled / disabled
|
|
|
|
$checkbox = new CheckboxItem('enabled', function(CliMenu $menu) use ($vhost) { |
|
|
|
$checkbox = new CheckboxItem('enabled', function(CliMenu $menu) use (&$vhost) { |
|
|
|
|
|
|
|
// check status
|
|
|
|
if ($menu->getSelectedItem()->getChecked()) { |
|
|
|