From 03c2cac26e4aae95138572993ffdf9275528d31e Mon Sep 17 00:00:00 2001 From: Dennis Date: Mon, 11 Nov 2024 08:55:11 +0100 Subject: [PATCH] Update SettingsController.php - Remove discord settings --- app/Http/Controllers/Admin/SettingsController.php | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/app/Http/Controllers/Admin/SettingsController.php b/app/Http/Controllers/Admin/SettingsController.php index e50ea7b19..3725801ff 100644 --- a/app/Http/Controllers/Admin/SettingsController.php +++ b/app/Http/Controllers/Admin/SettingsController.php @@ -9,7 +9,6 @@ use Illuminate\Contracts\View\View; use Illuminate\Http\Response; use Illuminate\Http\Request; -use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Redirect; use Illuminate\Support\Facades\Validator; use Qirolab\Theme\Theme; @@ -123,19 +122,6 @@ public function update(Request $request) $rp = new \ReflectionProperty($settingsClass, $key); $rpType = $rp->getType(); - // Check if the settingsclass is a DiscordSettings class - if($settings_class == 'App\Settings\DiscordSettings') { - if($key === 'client_id' || $key === 'client_secret') { - - $env = file_get_contents(base_path('.env')); - $env = preg_replace('/DISCORD_CLIENT_ID=(.*)/', 'DISCORD_CLIENT_ID=' . $request->input('client_id'), $env); - $env = preg_replace('/DISCORD_CLIENT_SECRET=(.*)/', 'DISCORD_CLIENT_SECRET=' . $request->input('client_secret'), $env); - file_put_contents(base_path('.env'), $env); - - Artisan::call('config:clear'); - } - } - if ($rpType == 'bool') { $settingsClass->$key = $request->has($key); continue;