You are here

function drupal_get_normal_path in Drupal 5

Same name and namespace in other branches
  1. 4 includes/path.inc \drupal_get_normal_path()
  2. 6 includes/path.inc \drupal_get_normal_path()
  3. 7 includes/path.inc \drupal_get_normal_path()

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

Parameters

$path: A Drupal path alias.

Return value

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

8 calls to drupal_get_normal_path()
drupal_access_denied in includes/common.inc
Generates a 403 error if the request is not allowed.
drupal_init_path in includes/path.inc
Initialize the $_GET['q'] variable to the proper normal path.
drupal_is_front_page in includes/path.inc
Check if the current page is the front page.
drupal_not_found in includes/common.inc
Generates a 404 error if the request can not be handled.
node_menu in modules/node/node.module
Implementation of hook_menu().

... See full list

File

includes/path.inc, line 117
Functions to handle paths in Drupal, including path aliasing.

Code

function drupal_get_normal_path($path) {
  $result = $path;
  if ($src = drupal_lookup_path('source', $path)) {
    $result = $src;
  }
  if (function_exists('custom_url_rewrite')) {
    $result = custom_url_rewrite('source', $result, $path);
  }
  return $result;
}