More steps for mobile theme toggling + dash elimination
This commit is contained in:
parent
8bac352b1c
commit
5c0220df09
20
boot.php
20
boot.php
@ -1964,13 +1964,19 @@ function current_theme(){
|
|||||||
$is_mobile = $a->is_mobile || $a->is_tablet;
|
$is_mobile = $a->is_mobile || $a->is_tablet;
|
||||||
|
|
||||||
if($is_mobile) {
|
if($is_mobile) {
|
||||||
$system_theme = ((isset($a->config['system']['mobile_theme'])) ? $a->config['system']['mobile_theme'] : '');
|
if(isset($_SESSION['show_mobile']) && !$_SESSION['show_mobile']) {
|
||||||
$theme_name = ((isset($_SESSION) && x($_SESSION,'mobile_theme')) ? $_SESSION['mobile_theme'] : $system_theme);
|
$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 === '---') {
|
if($theme_name === '---') {
|
||||||
// user has selected to have the mobile theme be the same as the normal one
|
// user has selected to have the mobile theme be the same as the normal one
|
||||||
$system_theme = '';
|
$system_theme = '';
|
||||||
$theme_name = '';
|
$theme_name = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -2345,7 +2351,7 @@ function construct_page(&$a) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($a->is_mobile || $a->is_tablet) {
|
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();
|
$link = $a->get_baseurl() . '/toggle_mobile?f=&address=' . curPageURL();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
function toggle_mobile_init(&$a) {
|
function toggle_mobile_init(&$a) {
|
||||||
|
|
||||||
if(isset($_GET['off']))
|
if(isset($_GET['off']))
|
||||||
$_SESSION['show-mobile'] = false;
|
$_SESSION['show_mobile'] = false;
|
||||||
else
|
else
|
||||||
$_SESSION['show-mobile'] = true;
|
$_SESSION['show_mobile'] = true;
|
||||||
|
|
||||||
if(isset($_GET['address']))
|
if(isset($_GET['address']))
|
||||||
$address = $_GET['address'];
|
$address = $_GET['address'];
|
||||||
|
Reference in New Issue
Block a user