Commit ce6dde98 authored by Dries's avatar Dries
Browse files

- Patch #100957 by Tobias and chx: fixed return value of drupal_lookup_path().

parent d24e8315
......@@ -55,10 +55,12 @@ function drupal_lookup_path($action, $path = '') {
}
elseif ($count > 0 && $path != '') {
if ($action == 'alias') {
if (isset($map[$path]) || array_key_exists($path, $map)) {
if (isset($map[$path])) {
return $map[$path];
}
$alias = db_result(db_query("SELECT dst FROM {url_alias} WHERE src = '%s'", $path));
if (!$alias = db_result(db_query("SELECT dst FROM {url_alias} WHERE src = '%s'", $path))) {
$alias = FALSE;
}
$map[$path] = $alias;
return $alias;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment