--- includes/path copy.inc 2009-12-16 09:35:11.000000000 -0800 +++ includes/path.inc 2010-02-10 17:21:47.000000000 -0800 @@ -61,14 +61,21 @@ $count = NULL; } elseif ($count > 0 && $path != '') { + if (preg_match('/([^#]*)(#.*)/', $path, $matches)) { + $path = $matches[1]; + $fragment = $matches[2]; + } + else { + $fragment = ''; + } if ($action == 'alias') { if (isset($map[$path_language][$path])) { - return $map[$path_language][$path]; + return $map[$path_language][$path] !== FALSE ? $map[$path_language][$path] . $fragment : $map[$path_language][$path]; } // Get the most fitting result falling back with alias without language $alias = db_result(db_query("SELECT dst FROM {url_alias} WHERE src = '%s' AND language IN('%s', '') ORDER BY language DESC", $path, $path_language)); $map[$path_language][$path] = $alias; - return $alias; + return $alias !== FALSE ? $alias . $fragment : $alias; } // Check $no_src for this $path in case we've already determined that there // isn't a path that has this alias @@ -87,7 +94,7 @@ $no_src[$path_language][$path] = TRUE; } } - return $src; + return $src !== FALSE ? $src . $fragment : $src; } }