diff options
| author | Rob Peters <makitso@gmail.com> | 2010-04-17 10:52:25 +0000 |
|---|---|---|
| committer | Rob Peters <makitso@gmail.com> | 2010-04-17 10:52:25 +0000 |
| commit | ed9f5ef3488f63949949b023f87d7243d89fa07c (patch) | |
| tree | c69a5a14bf5c18d1d4aae426614d04f41e3d47c7 /themes/colors | |
| parent | b6da8bcd15d30e95a8872dd667f30f9ee8f9d494 (diff) | |
| download | webtrees-ed9f5ef3488f63949949b023f87d7243d89fa07c.tar.gz webtrees-ed9f5ef3488f63949949b023f87d7243d89fa07c.tar.bz2 webtrees-ed9f5ef3488f63949949b023f87d7243d89fa07c.zip | |
Add site default setting for palette
Diffstat (limited to 'themes/colors')
| -rw-r--r-- | themes/colors/theme.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/themes/colors/theme.php b/themes/colors/theme.php index 1716cfd1a2..e43827e77a 100644 --- a/themes/colors/theme.php +++ b/themes/colors/theme.php @@ -75,6 +75,7 @@ if (isset($_GET['themecolor']) && array_key_exists($_GET['themecolor'], $COLOR_T $subColor=$_GET['themecolor']; if (WT_USER_ID) { set_user_setting(WT_USER_ID, 'themecolor', $subColor); + set_site_setting('DEFAULT_COLOR_PALETTE', $subColor); } unset($_GET['themecolor']); } elseif (isset($_SESSION['themecolor'])) { @@ -84,11 +85,15 @@ if (isset($_GET['themecolor']) && array_key_exists($_GET['themecolor'], $COLOR_T if (WT_USER_ID) { $subColor=get_user_setting(WT_USER_ID, 'themecolor'); if (!array_key_exists($subColor, $COLOR_THEME_LIST)) { - $subColor='ash'; + $subColor = get_site_setting('DEFAULT_COLOR_PALETTE','aquamarine'); } } else { // Default color set here - $subColor='ash'; + $test_value=get_site_setting('DEFAULT_COLOR_PALETTE'); + if (empty($test_value)) { + set_site_setting('DEFAULT_COLOR_PALETTE','ash'); + } + $subColor=get_site_setting('DEFAULT_COLOR_PALETTE'); } } |
