You are here

function ajax_path_info in Ajax 6

Collects path info

Parameters

$val String:

Return value

Assoc

1 call to ajax_path_info()
ajax_logintoboggan_ajax_alter in plugins/loggintoboggan/ajax_logintoboggan.module
Handles a special case for Login Toboggan redirection

File

./ajax.module, line 116

Code

function ajax_path_info($val) {
  $out = array(
    'path' => NULL,
    'query' => array(),
    'fragment' => NULL,
  );
  $u = parse_url($val);
  if (array_key_exists('query', $u)) {
    parse_str($u, $out['query']);
  }
  if (array_key_exists('path', $u)) {
    $out['path'] = $u['path'];
  }
  if (array_key_exists('fragment', $u)) {
    $out['fragment'] = $u['fragment'];
  }
  return $out;
}