- Fixed small glitch in locale.module.

3-00
Dries Buytaert 2001-05-20 16:49:27 +00:00
parent 27496c4620
commit 6c3e94e385
2 changed files with 2 additions and 2 deletions

View File

@ -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")) ."')");

View File

@ -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")) ."')");