aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-08-18 16:24:29 -0700
committerfriendica <info@friendica.com>2013-08-18 16:24:29 -0700
commite094c23f11c8a164224e8a35c77d2cfa089db7ed (patch)
treeff78b37895ea32de2065e844b1fd5f186b03d9e7
parent8bac352b1cbbefd12fe04e1b269367472cba58ee (diff)
parent5c0220df0942db7aded0540c8c408bfbaadf6c16 (diff)
downloadvolse-hubzilla-e094c23f11c8a164224e8a35c77d2cfa089db7ed.tar.gz
volse-hubzilla-e094c23f11c8a164224e8a35c77d2cfa089db7ed.tar.bz2
volse-hubzilla-e094c23f11c8a164224e8a35c77d2cfa089db7ed.zip
Merge pull request #100 from cvogeley/master
More steps for mobile theme toggling + dash elimination
-rwxr-xr-xboot.php22
-rw-r--r--mod/toggle_mobile.php4
2 files changed, 16 insertions, 10 deletions
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 {
diff --git a/mod/toggle_mobile.php b/mod/toggle_mobile.php
index 00991e44c..06dadca04 100644
--- a/mod/toggle_mobile.php
+++ b/mod/toggle_mobile.php
@@ -3,9 +3,9 @@
function toggle_mobile_init(&$a) {
if(isset($_GET['off']))
- $_SESSION['show-mobile'] = false;
+ $_SESSION['show_mobile'] = false;
else
- $_SESSION['show-mobile'] = true;
+ $_SESSION['show_mobile'] = true;
if(isset($_GET['address']))
$address = $_GET['address'];