Commit eda4d906 authored by Dries's avatar Dries

- Patch #42390 by chx: Field 'translation' doesn't have a default value query

parent 4ce3d625
......@@ -395,7 +395,7 @@ CREATE TABLE locales_source (
CREATE TABLE locales_target (
lid int(11) NOT NULL default '0',
translation blob NOT NULL default '',
translation blob NOT NULL,
locale varchar(12) NOT NULL default '',
plid int(11) NOT NULL default '0',
plural int(1) NOT NULL default '0',
......
......@@ -1698,13 +1698,3 @@ function system_update_174() {
}
return array();
}
function system_update_175() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$ret[] = update_sql("ALTER TABLE {locales_target} ALTER COLUMN translation SET DEFAULT ''");
}
return $ret;
}
......@@ -16,7 +16,7 @@ function _locale_add_language($code, $name, $onlylanguage = TRUE) {
db_query("INSERT INTO {locales_meta} (locale, name) VALUES ('%s','%s')", $code, $name);
$result = db_query("SELECT lid FROM {locales_source}");
while ($string = db_fetch_object($result)) {
db_query("INSERT INTO {locales_target} (lid, locale) VALUES (%d,'%s')", $string->lid, $code);
db_query("INSERT INTO {locales_target} (lid, locale, translation) VALUES (%d,'%s', '')", $string->lid, $code);
}
// If only the language was added, and not a PO file import triggered
......
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