diff --git a/modules/locale.module b/modules/locale.module index 1e2a074c865..40718a8f0e6 100644 --- a/modules/locale.module +++ b/modules/locale.module @@ -100,7 +100,7 @@ function locale_admin() { function locale($string) { global $locale; - if ($locale) { + if (variable_get("locale", 0)) { $result = db_query("SELECT id, $locale FROM locales WHERE STRCMP(string, '". addslashes($string) ."') = 0"); if ($translation = db_fetch_object($result)) $string = ($translation->$locale) ? check_output($translation->$locale) : $string; else db_query("INSERT INTO locales (string, location) VALUES ('". addslashes($string) ."', '". check_input(getenv("REQUEST_URI")) ."')"); diff --git a/modules/locale/locale.module b/modules/locale/locale.module index 1e2a074c865..40718a8f0e6 100644 --- a/modules/locale/locale.module +++ b/modules/locale/locale.module @@ -100,7 +100,7 @@ function locale_admin() { function locale($string) { global $locale; - if ($locale) { + if (variable_get("locale", 0)) { $result = db_query("SELECT id, $locale FROM locales WHERE STRCMP(string, '". addslashes($string) ."') = 0"); if ($translation = db_fetch_object($result)) $string = ($translation->$locale) ? check_output($translation->$locale) : $string; else db_query("INSERT INTO locales (string, location) VALUES ('". addslashes($string) ."', '". check_input(getenv("REQUEST_URI")) ."')");