function language_selection_page_boot in Language Selection Page 7.2
Same name and namespace in other branches
- 7 language_selection_page.module \language_selection_page_boot()
Implements hook_boot().
Prevents redirect by globalredirect. Putting this in hook_boot so that it executes before globalredirect_init().
See https://drupal.org/node/1438584#comment-6167916
File
- ./
language_selection_page.module, line 49
Code
function language_selection_page_boot() {
$path = array_slice(explode('/', trim($_SERVER['REQUEST_URI'], '/')), 0);
if (LANGUAGE_SELECTION_PAGE_BLOCK == variable_get('language_selection_page_redirect_type', LANGUAGE_SELECTION_PAGE_TEMPLATE_ONLY) || $path[0] == variable_get('language_selection_page_path', 'language_selection')) {
$_POST['globalredirect'] = 'Disabled on language selection page.';
}
}