From 92a7a6260887ac74a60fa9280fac31de82777bed Mon Sep 17 00:00:00 2001
From: rabuzarus <>
Date: Wed, 1 Jul 2015 16:22:08 +0200
Subject: [PATCH 1/3] fix mobile-view

---
 boot.php | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/boot.php b/boot.php
index 6e1951bffd..fbef7fa34f 100644
--- a/boot.php
+++ b/boot.php
@@ -1485,8 +1485,11 @@ if(! function_exists('current_theme')) {
 
 				if($theme_name === '---') {
 					// user has selected to have the mobile theme be the same as the normal one
-					$system_theme = '';
-					$theme_name = '';
+					$system_theme = $standard_system_theme;
+					$theme_name = $standard_theme_name;
+					
+					if($page_theme)
+						$theme_name = $page_theme;
 				}
 			}
 		}

From 7c3af0d3ed9f63fb9fc13143b54c346ca67deff8 Mon Sep 17 00:00:00 2001
From: rabuzarus <>
Date: Thu, 2 Jul 2015 02:15:36 +0200
Subject: [PATCH 2/3] fix for mobile-view on system pages

---
 boot.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/boot.php b/boot.php
index fbef7fa34f..57b8716f68 100644
--- a/boot.php
+++ b/boot.php
@@ -1480,7 +1480,7 @@ if(! function_exists('current_theme')) {
 				$theme_name = '';
 			}
 			else {
-				$system_theme = ((isset($a->config['system']['mobile-theme'])) ? $a->config['system']['mobile-theme'] : '');
+				$system_theme = ((isset($a->config['system']['mobile-theme'])) ? $a->config['system']['mobile-theme'] : $standard_system_theme);
 				$theme_name = ((isset($_SESSION) && x($_SESSION,'mobile-theme')) ? $_SESSION['mobile-theme'] : $system_theme);
 
 				if($theme_name === '---') {

From a0b522c3be46cdcc69bd5e553091a8f7a150c5a7 Mon Sep 17 00:00:00 2001
From: rabuzarus <>
Date: Thu, 2 Jul 2015 02:55:03 +0200
Subject: [PATCH 3/3] fix toggle mobile/desktop view

---
 boot.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/boot.php b/boot.php
index 57b8716f68..f0f8e9d7a5 100644
--- a/boot.php
+++ b/boot.php
@@ -1476,8 +1476,8 @@ if(! function_exists('current_theme')) {
 
 		if($is_mobile) {
 			if(isset($_SESSION['show-mobile']) && !$_SESSION['show-mobile']) {
-				$system_theme = '';
-				$theme_name = '';
+				$system_theme = $standard_system_theme;
+				$theme_name = $standard_theme_name;
 			}
 			else {
 				$system_theme = ((isset($a->config['system']['mobile-theme'])) ? $a->config['system']['mobile-theme'] : $standard_system_theme);