diff --git a/htdocs/admin/system/phpinfo.php b/htdocs/admin/system/phpinfo.php
index dc29a53141f..c6e2819f5d7 100644
--- a/htdocs/admin/system/phpinfo.php
+++ b/htdocs/admin/system/phpinfo.php
@@ -23,7 +23,8 @@
*/
require '../../main.inc.php';
-require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$langs->load("admin");
@@ -45,6 +46,23 @@ if (isset($title))
print_fiche_titre($langs->trans($title), '', 'setup');
}
+
+
+print '
';
+print '| '.$langs->trans("Parameter").' | '.$langs->trans("Value").' |
';
+print "\n";
+
+$var=false;
+
+// Recupere la version de l'OS
+$phpversion=version_php();
+print "| '.$langs->trans("Version")." | ".$phpversion." |
\n";
+
+print '
';
+print '
';
+
+
+
// Get php_info array
$phparray=phpinfo_array();
foreach($phparray as $key => $value)
@@ -68,7 +86,12 @@ foreach($phparray as $key => $value)
print ''.$keyparam.' | ';
$valtoshow=$keyvalue;
if ($keyparam == 'X-ChromePhp-Data') $valtoshow=dol_trunc($keyvalue,80);
- print ''.$valtoshow.' | ';
+ print '';
+ if ($keyparam == 'Path') $valtoshow=join('; ',explode(';',trim($valtoshow)));
+ if ($keyparam == 'PATH') $valtoshow=join('; ',explode(';',trim($valtoshow)));
+ if ($keyparam == '_SERVER["PATH"]') $valtoshow=join('; ',explode(';',trim($valtoshow)));
+ print $valtoshow;
+ print ' | ';
print '';
}
else
@@ -82,7 +105,7 @@ foreach($phparray as $key => $value)
print '';
$valtoshow=$keyvalue2;
if ($keyparam == 'disable_functions') $valtoshow=join(', ',explode(',',trim($valtoshow)));
- //print $keyparam2.' = ';
+ //print $keyparam;
print $valtoshow;
$i++;
print ' | ';
diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php
index 35271325247..b5f2dfce9c3 100644
--- a/htdocs/core/class/translate.class.php
+++ b/htdocs/core/class/translate.class.php
@@ -194,7 +194,7 @@ class Translate
// Redefine alt
$langarray=explode('_',$langofdir);
- if ($alt < 1 && strtolower($langarray[0]) == strtolower($langarray[1])) $alt=1;
+ if ($alt < 1 && isset($langarray[1]) && strtolower($langarray[0]) == strtolower($langarray[1])) $alt=1;
if ($alt < 2 && (strtolower($langofdir) == 'en_us' || strtolower($langofdir) == 'fr_fr' || strtolower($langofdir) == 'es_es')) $alt=2;
foreach($this->dir as $keydir => $searchdir)