summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/common.inc8
-rw-r--r--includes/menu.inc4
2 files changed, 7 insertions, 5 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 5dddd790c..f4cbac594 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -185,6 +185,10 @@ function drupal_get_path_alias($path) {
elseif (function_exists("conf_url_rewrite")) {
return conf_url_rewrite($path, 'outgoing');
}
+ else {
+ // No alias found. Return the normal path.
+ return $path;
+ }
}
/**
@@ -1171,9 +1175,7 @@ function url($url = NULL, $query = NULL, $fragment = NULL, $absolute = NULL) {
$script = (strpos($_SERVER["SERVER_SOFTWARE"], "Apache") === false) ? "index.php" : "";
}
- if ($alias = drupal_get_path_alias($url)) {
- $url = $alias;
- }
+ $url = drupal_get_path_alias($url);
if (isset($fragment)) {
$fragment = "#$fragment";
diff --git a/includes/menu.inc b/includes/menu.inc
index 0e208786b..49f13a06c 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -176,7 +176,7 @@ function menu_get_active_breadcrumb() {
$links[] = l(t('Home'), '');
- $trail = menu_get_trail($_GET['q']);
+ $trail = menu_get_trail(drupal_get_path_alias($_GET['q']));
// The last item in the trail is the page title; don't display it here.
array_pop($trail);
@@ -249,7 +249,7 @@ function menu_in_active_trail($mid) {
static $trail;
if (empty($trail)) {
- $trail = menu_get_trail($_GET['q']);
+ $trail = menu_get_trail(drupal_get_path_alias($_GET['q']));
}
return in_array($mid, $trail);