diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-05-08 09:48:14 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-05-08 09:48:14 +0000 |
commit | 32e8534d93b95bb646adc106bec440db095e2a81 (patch) | |
tree | 53b3572868814585d47a59726f081906f7fad80c | |
parent | a6084a5a367648ec4e01b74b7f81182bdf0d8b94 (diff) | |
download | brdo-32e8534d93b95bb646adc106bec440db095e2a81.tar.gz brdo-32e8534d93b95bb646adc106bec440db095e2a81.tar.bz2 |
#142074 by erdemkose: Bug and E_ALL: undefined variable
-rw-r--r-- | includes/locale.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/locale.inc b/includes/locale.inc index 97cff119d..d31755e23 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -831,7 +831,7 @@ function locale_translate_delete($lid) { function locale_add_language($langcode, $name, $native, $direction = LANGUAGE_RTL, $domain = '', $prefix = '', $verbose = TRUE) { // Default prefix on language code. if (empty($prefix)) { - $prefix = $code; + $prefix = $langcode; } db_query("INSERT INTO {languages} (language, name, native, direction, domain, prefix) VALUES ('%s', '%s', '%s', %d, '%s', '%s')", $langcode, $name, $native, $direction, $domain, $prefix); @@ -839,7 +839,7 @@ function locale_add_language($langcode, $name, $native, $direction = LANGUAGE_RT // Add empty translations for strings (to optimize locale()) $result = db_query("SELECT lid FROM {locales_source}"); while ($string = db_fetch_object($result)) { - db_query("INSERT INTO {locales_target} (lid, language, translation) VALUES (%d,'%s', '')", $string->lid, $code); + db_query("INSERT INTO {locales_target} (lid, language, translation) VALUES (%d,'%s', '')", $string->lid, $langcode); } // Set message depending on the verbosity required. @@ -1130,7 +1130,7 @@ function _locale_import_one_string($op, $value = NULL, $mode = NULL, $lang = NUL // Some real string to import else { - $comments = _locale_import_shorten_comments($value['#']); + $comments = _locale_import_shorten_comments(empty($value['#']) ? array() : $value['#']); // Handle a translation for some plural string if (strpos($value['msgid'], "\0")) { |