Closed (fixed)
Project:
Localization server
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Dec 2007 at 15:57 UTC
Updated:
2 Jan 2008 at 22:54 UTC
I remember from a different D6 case that doubles quotes are not allowed:
Wrong:
$count_sql = 'SELECT COUNT(DISTINCT t.sid) translation_count, r.pid, t.is_suggestion FROM {l10n_community_release} r INNER JOIN {l10n_community_file} f ON r.rid = f.rid INNER JOIN {l10n_community_line} l ON f.fid = l.fid INNER JOIN {l10n_community_string} s ON l.sid = s.sid LEFT JOIN {l10n_community_translation} t ON s.sid = t.sid WHERE t.is_active = 1 AND t.translation != "" ';
Good:
$count_sql = "SELECT COUNT(DISTINCT t.sid) translation_count, r.pid, t.is_suggestion FROM {l10n_community_release} r INNER JOIN {l10n_community_file} f ON r.rid = f.rid INNER JOIN {l10n_community_line} l ON f.fid = l.fid INNER JOIN {l10n_community_string} s ON l.sid = s.sid LEFT JOIN {l10n_community_translation} t ON s.sid = t.sid WHERE t.is_active = 1 AND t.translation != ''";
There could be much more bugs like this... i only saw this while it was 3 lines away from a different bug and therefor on my screen.
Comments
Comment #1
hass commentedOh well... there is much more stuff like this...
Comment #2
gábor hojtsyThere are MySQL only constructs used in the module anyway. Drupal.org will run this on MySQL. Feel free to submit patches to make this run on postgresql though.
Comment #3
gábor hojtsyWell, after all, I looked through all the queries I found, and only identified three SELECT queries which were affected. Now fixed those.
Comment #4
gábor hojtsy