X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/a6633642232efd164d4708967ab59e498fbff896..refs/pull/3042/head:/app/Http/Controllers/SettingController.php diff --git a/app/Http/Controllers/SettingController.php b/app/Http/Controllers/SettingController.php index f02f541bc..b12b0e3ce 100644 --- a/app/Http/Controllers/SettingController.php +++ b/app/Http/Controllers/SettingController.php @@ -1,4 +1,6 @@ - $version, - 'guestUser' => User::getDefault() + 'version' => $version, + 'guestUser' => User::getDefault(), ]); } @@ -42,7 +44,7 @@ class SettingController extends Controller $this->preventAccessInDemoMode(); $this->checkPermission('settings-manage'); $this->validate($request, [ - 'app_logo' => 'nullable|' . $this->getImageValidationRules(), + 'app_logo' => array_merge(['nullable'], $this->getImageValidationRules()), ]); // Cycles through posted settings and update them @@ -72,6 +74,7 @@ class SettingController extends Controller $this->logActivity(ActivityType::SETTINGS_UPDATE, $section); $this->showSuccessNotification(trans('settings.settings_save_success')); $redirectLocation = '/settings#' . $section; + return redirect(rtrim($redirectLocation, '#')); } }