Cleanup settings use in panel.
This commit is contained in:
parent
59b50ca75e
commit
1b9b92ac62
9 changed files with 36 additions and 17 deletions
|
@ -66,7 +66,8 @@ class AppSettingsCommand extends Command
|
|||
{--queue= : The queue driver backend to use.}
|
||||
{--redis-host= : Redis host to use for connections.}
|
||||
{--redis-pass= : Password used to connect to redis.}
|
||||
{--redis-port= : Port to connect to redis over.}';
|
||||
{--redis-port= : Port to connect to redis over.}
|
||||
{--disable-settings-ui}';
|
||||
|
||||
/**
|
||||
* @var array
|
||||
|
@ -135,8 +136,12 @@ class AppSettingsCommand extends Command
|
|||
self::ALLOWED_QUEUE_DRIVERS,
|
||||
array_key_exists($selected, self::ALLOWED_QUEUE_DRIVERS) ? $selected : null
|
||||
);
|
||||
|
||||
$this->variables['APP_ENVIRONMENT_ONLY'] = false;
|
||||
|
||||
if ($this->option('disable-settings-ui')) {
|
||||
$this->variables['APP_ENVIRONMENT_ONLY'] = true;
|
||||
} else {
|
||||
$this->variables['APP_ENVIRONMENT_ONLY'] = ! $this->confirm(trans('command/messages.environment.app.settings'), true);
|
||||
}
|
||||
|
||||
$this->checkForRedis();
|
||||
$this->writeToEnvironment($this->variables);
|
||||
|
|
|
@ -30,6 +30,18 @@ class AppServiceProvider extends ServiceProvider
|
|||
View::share('appIsGit', $this->versionData()['is_git'] ?? false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register application service providers.
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
// Only load the settings service provider if the environment
|
||||
// is configured to allow it.
|
||||
if (! config('pterodactyl.load_environment_only', false) && $this->app->environment() !== 'testing') {
|
||||
$this->app->register(SettingsServiceProvider::class);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return version information for the footer.
|
||||
*
|
||||
|
|
|
@ -64,10 +64,6 @@ class SettingsServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public function boot(ConfigRepository $config, Encrypter $encrypter, SettingsRepositoryInterface $settings)
|
||||
{
|
||||
if ($config->get('pterodactyl.load_environment_only', false)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Only set the email driver settings from the database if we
|
||||
// are configured using SMTP as the driver.
|
||||
if ($config->get('mail.driver') === 'smtp') {
|
||||
|
|
Reference in a new issue