Default settings to false
This commit is contained in:
@@ -117,7 +117,7 @@ class PirepService extends Service
|
|||||||
|
|
||||||
// See if this user is at the current airport
|
// See if this user is at the current airport
|
||||||
/* @noinspection NotOptimalIfConditionsInspection */
|
/* @noinspection NotOptimalIfConditionsInspection */
|
||||||
if (setting('pilots.only_flights_from_current')
|
if (setting('pilots.only_flights_from_current', false)
|
||||||
&& $user->curr_airport_id !== $pirep->dpt_airport_id) {
|
&& $user->curr_airport_id !== $pirep->dpt_airport_id) {
|
||||||
throw new UserNotAtAirport($user, $pirep->dpt_airport);
|
throw new UserNotAtAirport($user, $pirep->dpt_airport);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -161,6 +161,7 @@ if (!function_exists('setting')) {
|
|||||||
*/
|
*/
|
||||||
function setting($key, $default = null)
|
function setting($key, $default = null)
|
||||||
{
|
{
|
||||||
|
/** @var \App\Repositories\SettingRepository $settingRepo */
|
||||||
$settingRepo = app(SettingRepository::class);
|
$settingRepo = app(SettingRepository::class);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -181,6 +182,7 @@ if (!function_exists('setting')) {
|
|||||||
if (!function_exists('setting_save')) {
|
if (!function_exists('setting_save')) {
|
||||||
function setting_save($key, $value)
|
function setting_save($key, $value)
|
||||||
{
|
{
|
||||||
|
/** @var \App\Repositories\SettingRepository $settingRepo */
|
||||||
$settingRepo = app(SettingRepository::class);
|
$settingRepo = app(SettingRepository::class);
|
||||||
$settingRepo->save($key, $value);
|
$settingRepo->save($key, $value);
|
||||||
return $value;
|
return $value;
|
||||||
|
|||||||
Reference in New Issue
Block a user