function mobile_tools_redirection_disabled in Mobile Tools 7.3
Check if the redirection is disabled or not
Return value
boolean Return TRUE to disable the redirect, FALSE otherwise.
2 calls to mobile_tools_redirection_disabled()
- mobile_tools_init in ./
mobile_tools.module - Implements hook_init().
- mobile_tools_skip_redirect in ./
mobile_tools.module - Disable the redirection for the given user
File
- ./
mobile_tools.module, line 550 - Functionality to ease the creation of mixed device environments.
Code
function mobile_tools_redirection_disabled($clear = FALSE, $forced_state = NULL) {
// Check if the state has been predefined
if (!is_null($forced_state) and is_bool($forced_state)) {
$disable = $forced_state;
}
else {
$disable =& drupal_static(__FUNCTION__);
}
// Check the active providers if the state hasn't been predefined
if (($disable or $clear) and is_null($forced_state)) {
$active = purl_active()
->get();
$disable = _mobile_tools_get_active_purl_provider($active, MOBILE_TOOLS_PURL_PROVIDER_SKIP_REDIRECT);
}
return $disable;
}