aboutsummaryrefslogtreecommitdiffstats
path: root/mod/settings.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/settings.php')
-rw-r--r--mod/settings.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/mod/settings.php b/mod/settings.php
index 0f01807a2..a40883f35 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -291,10 +291,15 @@ function settings_content(&$a) {
$theme_selector = '<select name="theme" id="theme-select" >';
$files = glob('view/theme/*');
+
+ $default_theme = get_config('system','theme');
+ if(! $default_theme)
+ $default_theme = 'default';
+
if($files) {
foreach($files as $file) {
$f = basename($file);
- $selected = (($f == $_SESSION['theme']) || ($f === 'default' && (! x($_SESSION,'theme')))
+ $selected = (($f == $_SESSION['theme']) || ($f === $default_theme && (! x($_SESSION,'theme')))
? ' selected="selected" ' : '' );
$theme_selector .= '<option val="' . basename($file) . '"' . $selected . '>' . basename($file) . '</option>';
}