Fix: custom language file was not loaded

This commit is contained in:
Regis Houssin 2012-01-13 12:25:01 +01:00
parent a3220562d8
commit 8f35b53dd0
2 changed files with 4 additions and 4 deletions

View File

@ -246,7 +246,7 @@ class Translate {
$tab=explode('=',$line,2); $tab=explode('=',$line,2);
$key=trim($tab[0]); $key=trim($tab[0]);
//print "Domain=$domain, found a string for $tab[0] with value $tab[1]<br>"; //print "Domain=$domain, found a string for $tab[0] with value $tab[1]<br>";
if (empty($this->tab_translate[$key]) && isset($tab[1])) if ((! empty($conf->global->MAIN_FORCELANGDIR) || empty($this->tab_translate[$key])) && isset($tab[1]))
{ {
$value=trim(preg_replace('/\\n/',"\n",$tab[1])); $value=trim(preg_replace('/\\n/',"\n",$tab[1]));
@ -287,8 +287,8 @@ class Translate {
require_once(DOL_DOCUMENT_ROOT ."/lib/memory.lib.php"); require_once(DOL_DOCUMENT_ROOT ."/lib/memory.lib.php");
$size=dol_setcache($usecachekey,$tabtranslatedomain); $size=dol_setcache($usecachekey,$tabtranslatedomain);
} }
//exit;
break; // Break loop on each root dir if (empty($conf->global->MAIN_FORCELANGDIR)) break; // Break loop on each root dir. If a module has forced dir, we do not stop loop.
} }
} }
} }

View File

@ -130,7 +130,7 @@ if ($user->rights->fournisseur->facture->lire)
{ {
$sql .= " AND f.facnumber like '%".$_POST["sf_ref"] . "%'"; $sql .= " AND f.facnumber like '%".$_POST["sf_ref"] . "%'";
} }
$sql.= " GROUP BY f.facnumber"; $sql.= " GROUP BY f.facnumber,s.nom, s.rowid, f.rowid, f.total_ht, f.total_ttc, f.datef, f.date_lim_reglement, f.paye, f.fk_statut";
$sql.= " ORDER BY "; $sql.= " ORDER BY ";
$listfield=explode(',',$sortfield); $listfield=explode(',',$sortfield);