Commit f153bcb9 authored by Dries's avatar Dries

- Simplified the way the 'real path' is resolved.
parent ee922423
......@@ -815,7 +815,13 @@ function drupal_get_path_alias($path) {
*/
function drupal_get_normal_path($path) {
$map = drupal_get_path_map();
return $map[$path];
if ($map[$path]) {
return $map[$path];
}
else {
return $path;
}
}
function url($url = NULL, $query = NULL) {
......@@ -945,17 +951,10 @@ function drupal_page_footer() {
// initialize the _GET["q"] prior to loading the modules and invoking their 'init' hook:
if (!empty($_GET["q"])) {
if ($path = drupal_get_normal_path(trim($_GET["q"], "/"))) {
$_GET["q"] = $path;
}
$_GET["q"] = drupal_get_normal_path(trim($_GET["q"], "/"));
}
else {
if ($path = drupal_get_normal_path(variable_get("site_frontpage", "node"))) {
$_GET["q"] = $path;
}
else {
$_GET["q"] = variable_get("site_frontpage", "node");
}
$_GET["q"] = drupal_get_normal_path(variable_get("site_frontpage", "node"));
}
// initialize installed modules:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment