diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index ada45c571c62..7fefbf909022 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -348,7 +348,6 @@ public function postSettings(Request $request) } $setting->default_eula_text = $request->input('default_eula_text'); - $setting->load_remote = $request->input('load_remote', 0); $setting->thumbnail_max_h = $request->input('thumbnail_max_h'); $setting->privacy_policy_link = $request->input('privacy_policy_link'); $setting->depreciation_method = $request->input('depreciation_method'); @@ -411,6 +410,7 @@ public function postBranding(ImageUploadRequest $request) $setting->allow_user_skin = $request->input('allow_user_skin', '0'); $setting->show_url_in_emails = $request->input('show_url_in_emails', '0'); $setting->logo_print_assets = $request->input('logo_print_assets', '0'); + $setting->load_remote = $request->input('load_remote', 0); // Only allow the site name, images, and CSS to be changed if lock_passwords is false // Because public demos make people act like dicks diff --git a/app/Presenters/UserPresenter.php b/app/Presenters/UserPresenter.php index f60db150a1db..7c6d46573ecf 100644 --- a/app/Presenters/UserPresenter.php +++ b/app/Presenters/UserPresenter.php @@ -445,6 +445,10 @@ public function gravatar() return Storage::disk('public')->url('avatars/'.e($this->avatar)); } + // If there is a default avatar + if (Setting::getSettings()->default_avatar!= '') { + return Storage::disk('public')->url('avatars/'.e(Setting::getSettings()->default_avatar)); + } // Fall back to Gravatar if the settings allow loading remote scripts if (Setting::getSettings()->load_remote == '1') { @@ -460,10 +464,6 @@ public function gravatar() } } - // If there is a default avatar - if (Setting::getSettings()->default_avatar!= '') { - return Storage::disk('public')->url('avatars/'.e(Setting::getSettings()->default_avatar)); - } return false; } diff --git a/resources/views/settings/branding.blade.php b/resources/views/settings/branding.blade.php index 3bc21218117d..59f6acad36e6 100644 --- a/resources/views/settings/branding.blade.php +++ b/resources/views/settings/branding.blade.php @@ -119,6 +119,25 @@ "helpBlock" => trans('general.image_filetypes_help', ['size' => Helper::file_upload_max_size_readable()]), ]) + +
+
+ {{ trans('admin/settings/general.load_remote') }} +
+
+ + +

+ {{ trans('admin/settings/general.load_remote_help_text') }} +

+ +
+
+
diff --git a/resources/views/settings/general.blade.php b/resources/views/settings/general.blade.php index 2943901b8ca5..91d3b1c56f9d 100644 --- a/resources/views/settings/general.blade.php +++ b/resources/views/settings/general.blade.php @@ -144,24 +144,6 @@
- -
-
- {{ trans('admin/settings/general.load_remote') }} -
-
- - -

- {{ trans('admin/settings/general.load_remote_help_text') }} -

- -
-