-<?php namespace BookStack\Http\Controllers;
+<?php
+
+namespace BookStack\Http\Controllers;
use BookStack\Actions\ActivityType;
use BookStack\Auth\User;
$version = trim(file_get_contents(base_path('version')));
return view('settings.index', [
- 'version' => $version,
- 'guestUser' => User::getDefault()
+ 'version' => $version,
+ 'guestUser' => User::getDefault(),
]);
}
$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
$this->logActivity(ActivityType::SETTINGS_UPDATE, $section);
$this->showSuccessNotification(trans('settings.settings_save_success'));
$redirectLocation = '/settings#' . $section;
+
return redirect(rtrim($redirectLocation, '#'));
}
}