diff --git a/htdocs/includes/menus/barre_left/eldy_backoffice.php b/htdocs/includes/menus/barre_left/eldy_backoffice.php index df8a823f02ff47e319d9ceeeed23e9ebc4a548e1..5ee4c5ba37ae59d2ab1dba96c77676b9733d42d9 100644 --- a/htdocs/includes/menus/barre_left/eldy_backoffice.php +++ b/htdocs/includes/menus/barre_left/eldy_backoffice.php @@ -137,6 +137,7 @@ class MenuLeft { if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/dict.php", $langs->trans("DictionnarySetup")); if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/const.php", $langs->trans("OtherSetup")); + $newmenu->add(DOL_URL_ROOT."/admin/system/index.php?leftmenu=system", $langs->trans("DatabaseConnection")); $newmenu->add(DOL_URL_ROOT."/admin/system/index.php?leftmenu=system", $langs->trans("SystemInfo")); if ($leftmenu=="system") $newmenu->add_submenu(DOL_URL_ROOT."/admin/system/dolibarr.php", $langs->trans("Dolibarr"),1); if ($leftmenu=="system") $newmenu->add_submenu(DOL_URL_ROOT."/admin/system/constall.php", $langs->trans("AllParameters"),2); diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index d8307654a6eadad3302acf3dde78ef4b94f204c7..35c3357560b6845413150e52d7d2e3f5c3ec035b 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -42,12 +42,14 @@ $conffile = "../conf/conf.php"; $charset="ISO-8859-1"; if (file_exists($conffile)) { - include_once($conffile); + include_once($conffile); // Fichier conf charg� $charset=$character_set_client; if ($dolibarr_main_document_root) { require_once($dolibarr_main_document_root . "/conf/conf.class.php"); $conf=new Conf(); + if (! isset($character_set_client) || ! $character_set_client) $character_set_client='ISO-8859-1'; + $conf->character_set_client=$character_set_client; } if ($dolibarr_main_document_root && $dolibarr_main_db_type && ! defined('DONOTLOADCONF')) { diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index 80a49c17b5221bb561a7bb60cd58b33419f304d1..1a74b279524f1cb0088f0b01bbf1c7c136962567 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -1,5 +1,6 @@ # Dolibarr language file - fr_FR - main -charset=iso-8859-1 +CHARSET=ISO-8859-1 +DatabaseConnection=Connexion � la base SeparatorDecimal=, SeparatorThousand= Error=Erreur diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php index 7aa15409b60ea950c6128db793aa97e1658a7d5e..6e39bc46eea98a4ed3d986392512af83afcf5008 100644 --- a/htdocs/lib/functions.inc.php +++ b/htdocs/lib/functions.inc.php @@ -1292,7 +1292,7 @@ function accessforbidden($message='',$printheader=1) */ function dolibarr_print_error($db='',$error='') { - global $langs,$argv; + global $conf,$langs,$argv; $syslog = ''; // Si erreur intervenue avant chargement langue diff --git a/htdocs/translate.class.php b/htdocs/translate.class.php index 27738a3782fe5b33a25b22cd82dec5dd58f4ff5e..118b94fba41c32acc8a16868e29d11f00cd99815 100644 --- a/htdocs/translate.class.php +++ b/htdocs/translate.class.php @@ -199,9 +199,9 @@ class Translate { else { // On stocke toujours dans le tableau Tab en ISO - if ($this->charset_inputfile == 'ISO-8859-1') $value=$value; if ($this->charset_inputfile == 'UTF-8') $value=utf8_decode($value); - + //if ($this->charset_inputfile == 'ISO-8859-1') $value=$value; + $this->setTransFromTab($key,$value); } } @@ -256,7 +256,18 @@ class Translate { $newstr=ereg_replace('>','__gt__',$newstr); $newstr=ereg_replace('"','__quot__',$newstr); +/* + if ($key=='DatabaseConnection') { + print utf8_encode($newstr).'-'.$newstr; + print '-'.$this->charset_output; + print '-'.htmlentities($newstr,ENT_QUOTES,'UTF-8').'<br>'; + } +*/ + if ($this->charset_output=='UTF-8') $newstr=utf8_encode($newstr); + //if ($this->charset_output=='ISO-8859-1') $newstr=$newstr; + // Cryptage en html de la chaine + // $newstr est une chaine stockee en memoire au format $this->charset_output $newstr=htmlentities($newstr,ENT_QUOTES,$this->charset_output); // On restaure les tags HTML