From ceb9859d70080b67ab2a46ee93528f0813d734a2 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 18 Sep 2005 10:32:05 +0000 Subject: - Patch #29030 by Goba, chx, Jose, et al: reworked the URL rewrite hook so URLs can be rewritten dynamically. --- includes/common.inc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'includes/common.inc') diff --git a/includes/common.inc b/includes/common.inc index 2a098aa7c..28d975e61 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -134,16 +134,14 @@ function drupal_clear_path_cache() { * Given a path alias, return the internal path it represents. */ function drupal_get_normal_path($path) { - //drupal_get_path_alias($path); - if ($src = drupal_lookup_path('alias', $path)) { - return $src; + $result = $path; + if ($src = drupal_lookup_path('source', $path)) { + $result = $src; } - elseif (function_exists('conf_url_rewrite')) { - return conf_url_rewrite($path, 'incoming'); - } - else { - return $path; + if (function_exists('custom_url_rewrite')) { + $result = custom_url_rewrite('source', $result, $path); } + return $result; } /** -- cgit v1.2.3