Fix overwrite feature

This commit is contained in:
Laurent Destailleur 2019-04-27 21:42:52 +02:00
parent 70975b36c7
commit 5253c759af

View File

@ -466,7 +466,9 @@ class Translate
if (! $found && ! empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION))
{
// Overwrite translation with database read
$sql="SELECT transkey, transvalue FROM ".MAIN_DB_PREFIX."overwrite_trans where lang='".$db->escape($this->defaultlang)."'";
$sql ="SELECT transkey, transvalue FROM ".MAIN_DB_PREFIX."overwrite_trans where lang='".$db->escape($this->defaultlang)."' OR lang IS NULL";
$sql.=" AND entity IN (0, ".getEntity('overwrite_trans').")";
$sql.=$db->order("lang", "DESC");
$resql=$db->query($sql);
if ($resql)