Commit fbf4e0f1 authored by Dries's avatar Dries

- Patch #353823 by swentel: fixed database conversion.

parent 50acd87b
......@@ -66,10 +66,10 @@ function drupal_lookup_path($action, $path = '', $path_language = '') {
return $map[$path_language][$path];
}
// Get the most fitting result falling back with alias without language
$alias = db_query("SELECT dst FROM {url_alias} WHERE src = :src AND language IN(':language', '') ORDER BY language DESC", array(
$alias = db_query("SELECT dst FROM {url_alias} WHERE src = :src AND language IN(:language, '') ORDER BY language DESC", array(
':src' => $path,
':language' => $path_language))
->fetchField;
->fetchField();
$map[$path_language][$path] = $alias;
return $alias;
}
......@@ -83,7 +83,7 @@ function drupal_lookup_path($action, $path = '', $path_language = '') {
if ($src = db_query("SELECT src FROM {url_alias} WHERE dst = :dst AND language IN(:language, '') ORDER BY language DESC", array(
':dst' => $path,
':language' => $path_language))
->fetchField) {
->fetchField()) {
$map[$path_language][$src] = $path;
}
else {
......
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