From 658f0af428aeffcf9d46fc8ba37c798d92c3542e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 16 May 2013 12:37:46 +0200 Subject: [PATCH 1/2] Fix: Removed warning --- htdocs/core/class/translate.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) From bab4e1e5090a49b46bd426cbd72172905b54e831 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 16 May 2013 15:02:26 +0200 Subject: [PATCH 2/2] Fix: PHP version was lost Fix: split of long text to avoid horizontal scrolls --- htdocs/admin/system/phpinfo.php | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) 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 ''; +print "\n"; + +$var=false; + +// Recupere la version de l'OS +$phpversion=version_php(); +print "\n"; + +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("Version")."".$phpversion."
'; +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 '';