? Drupal_path_alias_alternate_by_goba.patch Index: includes/bootstrap.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v retrieving revision 1.66 diff -u -r1.66 bootstrap.inc --- includes/bootstrap.inc 8 Sep 2005 19:17:34 -0000 1.66 +++ includes/bootstrap.inc 15 Sep 2005 14:50:05 -0000 @@ -529,16 +529,15 @@ * Given an internal Drupal path, return the alias set by the administrator. */ function drupal_get_path_alias($path) { + $aliased = FALSE; if ($alias = drupal_lookup_path('source', $path)) { - return $alias; + $path = $alias; + $aliased = TRUE; } - elseif (function_exists('conf_url_rewrite')) { - return conf_url_rewrite($path, 'outgoing'); - } - else { - // No alias found. Return the normal path. - return $path; + if (function_exists('custom_url_rewrite')) { + $path = custom_url_rewrite('source', $path, $aliased); } + return $path; } /** @@ -678,9 +677,9 @@ * explanation in menu.inc for how to construct callbacks that take arguments. */ function arg($index) { - static $arguments, $q; + static $arguments = NULL; - if (empty($arguments) || $q != $_GET['q']) { + if (!isset($arguments)) { $arguments = explode('/', $_GET['q']); } Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.476 diff -u -r1.476 common.inc --- includes/common.inc 31 Aug 2005 18:37:30 -0000 1.476 +++ includes/common.inc 15 Sep 2005 14:50:06 -0000 @@ -134,16 +134,15 @@ * Given a path alias, return the internal path it represents. */ function drupal_get_normal_path($path) { - //drupal_get_path_alias($path); + $aliased = FALSE; if ($src = drupal_lookup_path('alias', $path)) { - return $src; + $path = $src; + $aliased = TRUE; } - elseif (function_exists('conf_url_rewrite')) { - return conf_url_rewrite($path, 'incoming'); - } - else { - return $path; + if (function_exists('custom_url_rewrite')) { + $path = custom_url_rewrite('alias', $path, $aliased); } + return $path; } /**