Commit ee3b3fe5 authored by yched's avatar yched

#155327 - add missing n. tables aliases is referenceable nodes query - thanks Killes

parent a8d6a95c
......@@ -420,7 +420,7 @@ function _nodereference_potential_references($field, $return_full_nodes = FALSE,
if (isset($field['referenceable_types'])) {
foreach ($field['referenceable_types'] as $related_type) {
if ($related_type) {
$related_types[] = " type = '%s'";
$related_types[] = " n.type = '%s'";
$args[] = $related_type;
}
}
......@@ -433,7 +433,7 @@ function _nodereference_potential_references($field, $return_full_nodes = FALSE,
}
if (isset($string)) {
$string_clause = $exact_string ? " AND title = '%s'" : " AND title LIKE '%%%s%'";
$string_clause = $exact_string ? " AND n.title = '%s'" : " AND n.title LIKE '%%%s%'";
$related_clause = "(". $related_clause .")". $string_clause;
$args[] = $string;
}
......
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