diff options
author | David Rothstein <drothstein@gmail.com> | 2012-07-08 23:40:47 -0400 |
---|---|---|
committer | David Rothstein <drothstein@gmail.com> | 2012-07-08 23:40:47 -0400 |
commit | efe6bdfd25b46a3bcb7dda5bf94937baea80ca79 (patch) | |
tree | 6af9c8eec3aa949f0accc5f724368be6b50102e3 /includes | |
parent | 2c7f5090503cb7e7165cee9882b2eb31ba04cd39 (diff) | |
download | brdo-efe6bdfd25b46a3bcb7dda5bf94937baea80ca79.tar.gz brdo-efe6bdfd25b46a3bcb7dda5bf94937baea80ca79.tar.bz2 |
Issue #1664528 by Carl Johan: Fixed It's impossible to search for 'Strings not translated to language ...'.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/locale.inc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/includes/locale.inc b/includes/locale.inc index fde19dd55..c168da0a7 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -1860,7 +1860,16 @@ function _locale_translate_seek() { } $sql_query = db_select('locales_source', 's'); - $sql_query->leftJoin('locales_target', 't', 't.lid = s.lid'); + + $limit_language = NULL; + if ($query['language'] != 'en' && $query['language'] != 'all') { + $sql_query->leftJoin('locales_target', 't', "t.lid = s.lid AND t.language = :langcode", array(':langcode' => $query['language'])); + $limit_language = $query['language']; + } + else { + $sql_query->leftJoin('locales_target', 't', 't.lid = s.lid'); + } + $sql_query->fields('s', array('source', 'location', 'context', 'lid', 'textgroup')); $sql_query->fields('t', array('translation', 'language')); @@ -1889,12 +1898,6 @@ function _locale_translate_seek() { break; } - $limit_language = NULL; - if ($query['language'] != 'en' && $query['language'] != 'all') { - $sql_query->condition('language', $query['language']); - $limit_language = $query['language']; - } - // Add a condition on the text group. if (!empty($query['group']) && $query['group'] != 'all') { $sql_query->condition('s.textgroup', $query['group']); |