From dd7764302f1484face1288d35673e9e9defdfebc Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Mon, 16 Aug 2004 17:42:36 +0000 Subject: [PATCH] - Patch #10111 by Killes: fixed some SQL queries. --- includes/locale.inc | 4 ++-- modules/locale.module | 2 +- modules/locale/locale.module | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/locale.inc b/includes/locale.inc index a572bc5043b7..19876577bb73 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -178,7 +178,7 @@ function _locale_import_po($file, $lang, $mode) { } else { db_query("INSERT INTO {locales_source} (location, source) VALUES ('%s', '%s')", $comments, $english[$key]); - $lid = db_fetch_object(db_query("SELECT lid FROM {locales_source} WHERE location = '%s' AND source = '%s'", $comments, $english[$key])); + $lid = db_fetch_object(db_query("SELECT lid FROM {locales_source} WHERE source = '%s'", $english[$key])); $lid = $lid->lid; } if ($key == 0) { @@ -207,7 +207,7 @@ function _locale_import_po($file, $lang, $mode) { } else { db_query("INSERT INTO {locales_source} (location, source) VALUES ('%s', '%s')", $comments, $english); - $loc = db_fetch_object(db_query("SELECT lid FROM {locales_source} WHERE location = '%s' AND source = '%s'", $comments, $english)); + $loc = db_fetch_object(db_query("SELECT lid FROM {locales_source} WHERE source = '%s'", $english)); $lid = $loc->lid; } if ($loc->translation && $mode == 'overwrite') { diff --git a/modules/locale.module b/modules/locale.module index ae6c407bdfc8..b7271481b6c0 100644 --- a/modules/locale.module +++ b/modules/locale.module @@ -179,7 +179,7 @@ function locale($string) { else { db_query("INSERT INTO {locales_source} (location, source) VALUES ('%s', '%s')", request_uri(), $string); if ($locale) { - $lid = db_fetch_object(db_query("SELECT lid FROM {locales_source} WHERE location = '%s' AND source = '%s'", request_uri(), $string)); + $lid = db_fetch_object(db_query("SELECT lid FROM {locales_source} WHERE source = '%s'", $string)); db_query("INSERT INTO {locales_target} (lid, locale) VALUES (%d, '%s')", $lid->lid, $locale); } } diff --git a/modules/locale/locale.module b/modules/locale/locale.module index ae6c407bdfc8..b7271481b6c0 100644 --- a/modules/locale/locale.module +++ b/modules/locale/locale.module @@ -179,7 +179,7 @@ function locale($string) { else { db_query("INSERT INTO {locales_source} (location, source) VALUES ('%s', '%s')", request_uri(), $string); if ($locale) { - $lid = db_fetch_object(db_query("SELECT lid FROM {locales_source} WHERE location = '%s' AND source = '%s'", request_uri(), $string)); + $lid = db_fetch_object(db_query("SELECT lid FROM {locales_source} WHERE source = '%s'", $string)); db_query("INSERT INTO {locales_target} (lid, locale) VALUES (%d, '%s')", $lid->lid, $locale); } } -- GitLab