diff options
author | zotlabs <mike@macgirvin.com> | 2018-02-07 17:54:21 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-02-07 17:54:21 -0800 |
commit | 1d8d2c6e5517ec7cbb9aa089993918ff6492f5c3 (patch) | |
tree | b86a76ae1ccc30b47241354d86729777cf5b7a53 /Zotlabs/Render/Theme.php | |
parent | b41c5f349715abc6ca7db563e3938336bc75974e (diff) | |
parent | dc88ccdc0b8af8c9af033b3eaf325cee0c195ff8 (diff) | |
download | volse-hubzilla-1d8d2c6e5517ec7cbb9aa089993918ff6492f5c3.tar.gz volse-hubzilla-1d8d2c6e5517ec7cbb9aa089993918ff6492f5c3.tar.bz2 volse-hubzilla-1d8d2c6e5517ec7cbb9aa089993918ff6492f5c3.zip |
Merge branch 'master' into z6
Diffstat (limited to 'Zotlabs/Render/Theme.php')
-rw-r--r-- | Zotlabs/Render/Theme.php | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/Zotlabs/Render/Theme.php b/Zotlabs/Render/Theme.php index 09cc7a4d4..0eebba1ba 100644 --- a/Zotlabs/Render/Theme.php +++ b/Zotlabs/Render/Theme.php @@ -8,10 +8,8 @@ use App; class Theme { static $system_theme = null; - static $system_mobile_theme = null; static $session_theme = null; - static $session_mobile_theme = null; /** * @brief Array with base or fallback themes. @@ -32,10 +30,6 @@ class Theme { ? \App::$config['system']['theme'] : ''); self::$session_theme = ((isset($_SESSION) && x($_SESSION, 'theme')) ? $_SESSION['theme'] : self::$system_theme); - self::$system_mobile_theme = ((isset(\App::$config['system']['mobile_theme'])) - ? \App::$config['system']['mobile_theme'] : ''); - self::$session_mobile_theme = ((isset($_SESSION) && x($_SESSION, 'mobile_theme')) - ? $_SESSION['mobile_theme'] : self::$system_mobile_theme); $page_theme = null; @@ -55,30 +49,12 @@ class Theme { if(array_key_exists('theme', \App::$layout) && \App::$layout['theme']) $page_theme = \App::$layout['theme']; - // If the viewer is on a mobile device, ensure that we're using a mobile - // theme of some kind or whatever the viewer's preference is for mobile - // viewing (if applicable) + $chosen_theme = self::$session_theme; - if(\App::$is_mobile || \App::$is_tablet) { - if(isset($_SESSION['show_mobile']) && (! $_SESSION['show_mobile'])) { - $chosen_theme = self::$session_theme; - } - else { - $chosen_theme = self::$session_mobile_theme; - - if($chosen_theme === '' || $chosen_theme === '---' ) { - // user has selected to have the mobile theme be the same as the normal one - $chosen_theme = self::$session_theme; - } - } + if($page_theme) { + $chosen_theme = $page_theme; } - else { - $chosen_theme = self::$session_theme; - if($page_theme) { - $chosen_theme = $page_theme; - } - } if(array_key_exists('theme_preview', $_GET)) $chosen_theme = $_GET['theme_preview']; |