several fixes

This commit is contained in:
Denis Duliçi
2021-05-14 18:29:24 +03:00
parent 7ac53681ff
commit b8057a7a12
19 changed files with 165 additions and 75 deletions

View File

@ -113,6 +113,10 @@ class Settings extends Controller
}
if ($real_key == 'default.locale') {
if (!in_array($value, config('language.allowed'))) {
continue;
}
user()->setAttribute('locale', $value)->save();
}
@ -156,10 +160,10 @@ class Settings extends Controller
Installer::updateEnv(['MAIL_FROM_NAME' => '"' . $value . '"']);
break;
case 'company.email':
Installer::updateEnv(['MAIL_FROM_ADDRESS' => $value]);
Installer::updateEnv(['MAIL_FROM_ADDRESS' => '"' . $value . '"']);
break;
case 'default.locale':
Installer::updateEnv(['APP_LOCALE' => $value]);
Installer::updateEnv(['APP_LOCALE' => '"' . $value . '"']);
break;
case 'schedule.time':
Installer::updateEnv(['APP_SCHEDULE_TIME' => '"' . $value . '"']);