From 5c0220df0942db7aded0540c8c408bfbaadf6c16 Mon Sep 17 00:00:00 2001 From: Christian Vogeley Date: Mon, 19 Aug 2013 01:08:15 +0200 Subject: More steps for mobile theme toggling + dash elimination --- boot.php | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index f7d507d22..7b2d72f3c 100755 --- a/boot.php +++ b/boot.php @@ -1964,13 +1964,19 @@ function current_theme(){ $is_mobile = $a->is_mobile || $a->is_tablet; if($is_mobile) { - $system_theme = ((isset($a->config['system']['mobile_theme'])) ? $a->config['system']['mobile_theme'] : ''); - $theme_name = ((isset($_SESSION) && x($_SESSION,'mobile_theme')) ? $_SESSION['mobile_theme'] : $system_theme); - - if($theme_name === '---') { - // user has selected to have the mobile theme be the same as the normal one - $system_theme = ''; - $theme_name = ''; + if(isset($_SESSION['show_mobile']) && !$_SESSION['show_mobile']) { + $system_theme = ''; + $theme_name = ''; + } + else { + $system_theme = ((isset($a->config['system']['mobile_theme'])) ? $a->config['system']['mobile_theme'] : ''); + $theme_name = ((isset($_SESSION) && x($_SESSION,'mobile_theme')) ? $_SESSION['mobile_theme'] : $system_theme); + + if($theme_name === '---') { + // user has selected to have the mobile theme be the same as the normal one + $system_theme = ''; + $theme_name = ''; + } } } else { @@ -2345,7 +2351,7 @@ function construct_page(&$a) { } if($a->is_mobile || $a->is_tablet) { - if(isset($_SESSION['show-mobile']) && !$_SESSION['show-mobile']) { + if(isset($_SESSION['show_mobile']) && !$_SESSION['show_mobile']) { $link = $a->get_baseurl() . '/toggle_mobile?f=&address=' . curPageURL(); } else { -- cgit v1.2.3