Index: includes/bootstrap.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v retrieving revision 1.60 diff -u -F^f -r1.60 bootstrap.inc --- includes/bootstrap.inc 5 Aug 2005 00:49:02 -0000 1.60 +++ includes/bootstrap.inc 17 Aug 2005 11:30:54 -0000 @@ -680,6 +680,7 @@ function arg($index) { if (empty($arguments) || $q != $_GET['q']) { $arguments = explode('/', $_GET['q']); + $q = $_GET['q']; } if (isset($arguments[$index])) { Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.467 diff -u -F^f -r1.467 common.inc --- includes/common.inc 16 Aug 2005 18:06:18 -0000 1.467 +++ includes/common.inc 17 Aug 2005 11:30:55 -0000 @@ -1587,6 +1590,14 @@ function url($path = NULL, $query = NULL $path = drupal_get_path_alias($path); + // we use array_reverse because restore will be done by hook_init + // implementations which are called in normal order + foreach(array_reverse(module_implements('url_rewrite')) as $module) { + $function = $module .'_url_rewrite'; + // we can't use module_invoke because all these four can be references + $function($path, $query, $fragment, $absolute); + } + if (isset($fragment)) { $fragment = '#'. $fragment; }