mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-09-24 18:37:52 +02:00
(cherry picked from commit ba677de0c699cf8719bf28f67da7bbe62a1de85f)
This commit is contained in:
parent
a6a3de3d1e
commit
a76881ffa5
@ -186,6 +186,7 @@ class PreferenceForm extends Form
|
||||
);
|
||||
}
|
||||
|
||||
$themeFile = StyleSheet::getThemeFile(Config::app()->get('themes', 'default'));
|
||||
if (! (bool) Config::app()->get('themes', 'disabled', false)) {
|
||||
$themes = Icinga::app()->getThemes();
|
||||
if (count($themes) > 1) {
|
||||
@ -212,7 +213,10 @@ class PreferenceForm extends Form
|
||||
|
||||
if (isset($formData['theme']) && $formData['theme'] !== StyleSheet::DEFAULT_THEME) {
|
||||
$themeFile = StyleSheet::getThemeFile($formData['theme']);
|
||||
$file = $themeFile !== null ? @file_get_contents($themeFile) : false;
|
||||
}
|
||||
|
||||
if ($themeFile !== null) {
|
||||
$file = @file_get_contents($themeFile);
|
||||
if ($file && strpos($file, StyleSheet::LIGHT_MODE_IDENTIFIER) === false) {
|
||||
$disabled = ['', 'light', 'system'];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user