From 846a9813b23911ae2a87d87fb6fd9f188ed84dc0 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 1 Oct 2012 18:02:11 -0700 Subject: here's where the heavy lifting begins - everything is likely to be broken for quite some time as we add location and db independence to items and conversations and work through the rest of the permissions and how to federate the buggers. --- boot.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'boot.php') 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'] : ''); -- cgit v1.2.3