1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-22 09:02:28 +01:00

Removed the use of Auth facade and removed unnecesary option

This commit is contained in:
stanjg 2018-06-01 16:10:32 +02:00
parent 3bb9e5e8a8
commit e9ac014bf4
No known key found for this signature in database
GPG Key ID: 27D9DF9D28935303
3 changed files with 1 additions and 8 deletions

View File

@ -7,9 +7,7 @@ APP_CLEAR_TASKLOG=720
APP_DELETE_MINUTES=10
APP_ENVIRONMENT_ONLY=true
LOG_CHANNEL=daily
APP_LOCALE=en
APP_LOCALE_IS_GLOBAL=false
DB_HOST=127.0.0.1
DB_PORT=3306

View File

@ -48,11 +48,7 @@ class LanguageMiddleware
*/
public function handle(Request $request, Closure $next)
{
if (! Auth::check() || $this->config->get('pterodactyl.lang.global')) {
$this->app->setLocale($this->config->get('app.locale', 'en'));
} else {
$this->app->setLocale(Auth::user()->language);
}
$this->app->setLocale($request->user()->language ?? $this->config->get('app.locale'));
return $next($request);
}

View File

@ -161,7 +161,6 @@ return [
*/
'lang' => [
'in_context' => env('PHRASE_IN_CONTEXT', false),
'global' => env('APP_LOCALE_IS_GLOBAL', false),
],
/*