diff options
author | zotlabs <mike@macgirvin.com> | 2018-02-05 18:06:25 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-02-05 18:06:25 -0800 |
commit | cadd958339323f5fcf4c2b438f7a5e311e477d52 (patch) | |
tree | 9c1d4c94d68bc5aa193a4c6cc163c6874f6f6ab1 /Zotlabs/Render | |
parent | b06c52553d1fee69062b533a46b80190d9b4b350 (diff) | |
download | volse-hubzilla-cadd958339323f5fcf4c2b438f7a5e311e477d52.tar.gz volse-hubzilla-cadd958339323f5fcf4c2b438f7a5e311e477d52.tar.bz2 volse-hubzilla-cadd958339323f5fcf4c2b438f7a5e311e477d52.zip |
remove mobile_detect (outdated and unmaintainable)
Diffstat (limited to 'Zotlabs/Render')
-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']; |