diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-09-18 10:32:05 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-09-18 10:32:05 +0000 |
commit | ceb9859d70080b67ab2a46ee93528f0813d734a2 (patch) | |
tree | 5d61eea920612faada9cbd0a9466d9ab6d7257d7 /includes/common.inc | |
parent | f0cc7b4efcc9a8b8a90bb76d5ad19f6db103cf34 (diff) | |
download | brdo-ceb9859d70080b67ab2a46ee93528f0813d734a2.tar.gz brdo-ceb9859d70080b67ab2a46ee93528f0813d734a2.tar.bz2 |
- Patch #29030 by Goba, chx, Jose, et al: reworked the URL rewrite hook so URLs can be rewritten dynamically.
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 14 |
1 files changed, 6 insertions, 8 deletions
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; } /** |