aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index 778e00cfc..ff4547720 100644
--- a/boot.php
+++ b/boot.php
@@ -538,6 +538,14 @@ if(! class_exists('App')) {
if($this->pager['start'] < 0)
$this->pager['start'] = 0;
$this->pager['total'] = 0;
+
+ /**
+ * Detect mobile devices
+ */
+
+ $mobile_detect = new Mobile_Detect();
+ $this->is_mobile = $mobile_detect->isMobile();
+ $this->is_tablet = $mobile_detect->isTablet();
}
function get_baseurl($ssl = false) {
@@ -1544,8 +1552,9 @@ if(! function_exists('current_theme')) {
$a = get_app();
- $mobile_detect = new Mobile_Detect();
- $is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet();
+// $mobile_detect = new Mobile_Detect();
+// $is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet();
+ $is_mobile = $a->is_mobile || $a->is_tablet;
if($is_mobile) {
$system_theme = ((isset($a->config['system']['mobile-theme'])) ? $a->config['system']['mobile-theme'] : '');