Skip to content

Commit 349114c

Browse files
PiggyPigletDaneEveritt
authored andcommitted
Add a --settings-ui option for AppSettingsCommand (pterodactyl#1446)
* Add a --settings-ui option for AppSettingsCommand Sorry if my code is below par, I don't know php. All this does is allow the APP_ENVIRONMENT_ONLY to be set via an option, which as far as I can tell, isn't currently possible. I've tested this on a local installation and it works.
1 parent 3611ce7 commit 349114c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/Console/Commands/Environment/AppSettingsCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class AppSettingsCommand extends Command
6868
{--redis-host= : Redis host to use for connections.}
6969
{--redis-pass= : Password used to connect to redis.}
7070
{--redis-port= : Port to connect to redis over.}
71-
{--disable-settings-ui}';
71+
{--settings-ui= : Enable or disable the settings UI.}';
7272

7373
/**
7474
* @var array
@@ -138,8 +138,8 @@ public function handle()
138138
array_key_exists($selected, self::ALLOWED_QUEUE_DRIVERS) ? $selected : null
139139
);
140140

141-
if ($this->option('disable-settings-ui')) {
142-
$this->variables['APP_ENVIRONMENT_ONLY'] = 'true';
141+
if (! is_null($this->option('settings-ui'))) {
142+
$this->variables['APP_ENVIRONMENT_ONLY'] = $this->option('settings-ui') == 'true' ? 'false' : 'true';
143143
} else {
144144
$this->variables['APP_ENVIRONMENT_ONLY'] = $this->confirm(trans('command/messages.environment.app.settings'), true) ? 'false' : 'true';
145145
}

0 commit comments

Comments
 (0)