You are here

function drupal_get_normal_path in Redis 7.2

Same name and namespace in other branches
  1. 7.3 redis.path.inc \drupal_get_normal_path()

Given a path alias, return the internal path it represents.

Parameters

$path: A Drupal path alias.

$path_language: An optional language code to look up the path in.

Return value

The internal path represented by the alias, or the original alias if no internal path was found.

1 call to drupal_get_normal_path()
drupal_path_initialize in ./redis.path.inc
Initialize the $_GET['q'] variable to the proper normal path.

File

./redis.path.inc, line 255
Drupal default includes/path.inc file copy which only differs in:

Code

function drupal_get_normal_path($path, $path_language = NULL) {
  $original_path = $path;

  // Lookup the path alias first.
  if ($source = drupal_lookup_path('source', $path, $path_language)) {
    $path = $source;
  }

  // Allow other modules to alter the inbound URL. We cannot use drupal_alter()
  // here because we need to run hook_url_inbound_alter() in the reverse order
  // of hook_url_outbound_alter().
  foreach (array_reverse(module_implements('url_inbound_alter')) as $module) {
    $function = $module . '_url_inbound_alter';
    $function($path, $original_path, $path_language);
  }
  return $path;
}