diff options
Diffstat (limited to 'modules/path/path.module')
-rw-r--r-- | modules/path/path.module | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/path/path.module b/modules/path/path.module index bb1820662..b932a1b66 100644 --- a/modules/path/path.module +++ b/modules/path/path.module @@ -233,11 +233,10 @@ function path_nodeapi(&$node, $op, $arg) { case 'load': $path = "node/$node->nid"; - // We don't use drupal_get_path_alias() to avoid custom rewrite functions. - // We only care about exact aliases. - $result = db_query("SELECT dst FROM {url_alias} WHERE src = '%s'", $path); - if (db_num_rows($result)) { - $node->path = db_result($result); + $language = isset($node->language) ? $node->language : ''; + $alias = drupal_get_path_alias($path, $language); + if ($path != $alias) { + $node->path = $alias; } break; |