aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-01-03 21:55:21 -0800
committerFriendika <info@friendika.com>2011-01-03 21:55:21 -0800
commit7ae8486b36b06be3bf3d8482298d23305ebb956b (patch)
treeceb8f42830146c6b0259b911c181d1dc7dfdf4ed /mod
parent8bd9e31f20ee0d7657cd3ab30a41ff627d49af92 (diff)
downloadvolse-hubzilla-7ae8486b36b06be3bf3d8482298d23305ebb956b.tar.gz
volse-hubzilla-7ae8486b36b06be3bf3d8482298d23305ebb956b.tar.bz2
volse-hubzilla-7ae8486b36b06be3bf3d8482298d23305ebb956b.zip
settings: ensure system theme is default selection
Diffstat (limited to 'mod')
-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>';
}