Commit 32e8534d authored by Gábor Hojtsy's avatar Gábor Hojtsy

#142074 by erdemkose: Bug and E_ALL: undefined variable

parent a6084a5a
......@@ -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")) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment