better location for toggle_mobile code
This commit is contained in:
parent
0ba1bdbb08
commit
3e59b0715b
18
index.php
18
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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue