From 3e59b0715baa4b01b009f5e65a16a33c9cff4c36 Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Thu, 3 Jan 2013 11:16:10 -0700 Subject: [PATCH] better location for toggle_mobile code --- index.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/index.php b/index.php index dd19bb8336..19673fa7f9 100644 --- a/index.php +++ b/index.php @@ -377,15 +377,9 @@ if($a->module != 'install') { } /** - * Build the page - now that we have all the components + * Add a "toggle mobile" link if we're using a mobile device */ -if(!$a->theme['stylesheet']) - $stylesheet = current_theme_url(); -else - $stylesheet = $a->theme['stylesheet']; -$a->page['htmlhead'] = replace_macros($a->page['htmlhead'], array('$stylesheet' => $stylesheet)); - if($a->is_mobile || $a->is_tablet) { if(isset($_SESSION['show-mobile']) && !$_SESSION['show-mobile']) { $link = $a->get_baseurl() . '/toggle_mobile?address=' . curPageURL(); @@ -399,6 +393,16 @@ if($a->is_mobile || $a->is_tablet) { )); } +/** + * Build the page - now that we have all the components + */ + +if(!$a->theme['stylesheet']) + $stylesheet = current_theme_url(); +else + $stylesheet = $a->theme['stylesheet']; +$a->page['htmlhead'] = replace_macros($a->page['htmlhead'], array('$stylesheet' => $stylesheet)); + $page = $a->page; $profile = $a->profile;