You are here

function _language_selection_page_parse_url_custom in Language Selection Page 6

Custom function to parse a URL.

Return value

array

4 calls to _language_selection_page_parse_url_custom()
language_selection_page_init in ./language_selection_page.module
Implements hook_init().
language_selection_page_selection_page in ./language_selection_page.pages.inc
Menu callback to display the selection page.
_language_selection_page_detect_lang_from_url in includes/language_selection_page.helpers.inc
Custom function who detect the language from URL.
_language_selection_page_detect_lang_from_url_argument in includes/language_selection_page.helpers.inc
Custom function who detect the language from a URL argument.

File

includes/language_selection_page.helpers.inc, line 11
This file contains all the custom functions needed for the module.

Code

function _language_selection_page_parse_url_custom() {
  $url = url($_REQUEST['q'], array(
    'absolute' => TRUE,
    'language' => new stdClass(),
  ));
  $array_url = parse_url($url . '?' . $_SERVER['QUERY_STRING']);
  if (isset($array_url['query'])) {
    parse_str($array_url['query'], $array_url['query']);
  }
  return $array_url;
}