Closed (fixed)
Project:
Mobile Tools
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Mar 2010 at 21:09 UTC
Updated:
10 May 2010 at 20:50 UTC
When you are using a custom module for device detection which makes use of hook_is_mobile_device this doesn't work because the hook could not be invoked in mobile_tools_boot. This can be fixed if you add "mobile_tools_load_modules()" before you call mobile_tools_is_mobile_device:
function mobile_tools_boot() {
global $conf, $user, $base_url;
mobile_tools_load_modules();
$_SESSION['mobile-tools-mobile-device'] = mobile_tools_is_mobile_device();
$_SESSION['mobile-tools-site-type'] = mobile_tools_is_mobile_site();
...
Comments
Comment #7
twom commentedThis could mean a performance loss of your site....
Instead I use now the drupal_load('module', $modulename) function to be sure that the custom module is loaded.
I hope this will work for you.