Refactor helper drift in lib: centralize theme/translation and remove app() hotspots
This commit is contained in:
@@ -247,8 +247,7 @@ class TenantService
|
||||
) {
|
||||
$errors[] = t('Primary color is invalid');
|
||||
}
|
||||
$themes = function_exists('appThemes') ? appThemes() : [];
|
||||
if ($form['default_theme'] !== '' && !isset($themes[$form['default_theme']])) {
|
||||
if ($form['default_theme'] !== '' && !$this->settingsGateway->isAllowedTheme((string) $form['default_theme'])) {
|
||||
$errors[] = t('Default theme is invalid');
|
||||
}
|
||||
if (!in_array($form['allow_user_theme_mode'], ['', '0', '1'], true)) {
|
||||
|
||||
Reference in New Issue
Block a user