Commit 64756c74 authored by Dave Reid's avatar Dave Reid

Issue #2186239 by codeamatic, samhain: Fixed possible ambiguous language...

Issue #2186239 by codeamatic, samhain: Fixed possible ambiguous language column error in xmlsitemap_i18n_query_xmlsitemap_generate_alter().
parent f543f12e
...@@ -86,24 +86,24 @@ function xmlsitemap_i18n_query_xmlsitemap_generate_alter(QueryAlterableInterface ...@@ -86,24 +86,24 @@ function xmlsitemap_i18n_query_xmlsitemap_generate_alter(QueryAlterableInterface
switch ($mode) { switch ($mode) {
case 'simple': case 'simple':
// Current language and language neutral. // Current language and language neutral.
$query->condition('language', array($current, LANGUAGE_NONE)); $query->condition('x.language', array($current, LANGUAGE_NONE));
break; break;
case 'mixed': case 'mixed':
// Mixed current language (if available) or default language (if not) and language neutral. // Mixed current language (if available) or default language (if not) and language neutral.
$query->condition('language', array($current, $default, LANGUAGE_NONE)); $query->condition('x.language', array($current, $default, LANGUAGE_NONE));
break; break;
case 'default': case 'default':
// Only default language and language neutral. // Only default language and language neutral.
$query->condition('language', array($default, LANGUAGE_NONE)); $query->condition('x.language', array($default, LANGUAGE_NONE));
break; break;
case 'strict': case 'strict':
// Only current language (for nodes), simple for all other types. // Only current language (for nodes), simple for all other types.
$node_condition = db_and(); $node_condition = db_and();
$node_condition->condition('type', 'node'); $node_condition->condition('x.type', 'node');
$node_condition->condition('language', $current); $node_condition->condition('x.language', $current);
$normal_condition = db_and(); $normal_condition = db_and();
$normal_condition->condition('type', 'node', '<>'); $normal_condition->condition('x.type', 'node', '<>');
$normal_condition->condition('language', array($current, LANGUAGE_NONE)); $normal_condition->condition('x.language', array($current, LANGUAGE_NONE));
$condition = db_or(); $condition = db_or();
$condition->condition($node_condition); $condition->condition($node_condition);
$condition->condition($normal_condition); $condition->condition($normal_condition);
......
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