From 1834d642b3469d245fef36dd0997cdc9ae90ed96 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 30 May 2021 17:04:12 +0200 Subject: [PATCH] Fix phpcs --- htdocs/admin/system/perf.php | 6 +++--- htdocs/admin/system/security.php | 21 ++++++++++++++++++++- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/system/perf.php b/htdocs/admin/system/perf.php index 32fbe8ab41c..2a8dfa975cd 100644 --- a/htdocs/admin/system/perf.php +++ b/htdocs/admin/system/perf.php @@ -75,7 +75,7 @@ print '
'; print ''.$langs->trans("Syslog").': '; $test = empty($conf->syslog->enabled); if ($test) { - print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled").' - '.$langs->trans("NotSlowedDownByThis"); + print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled").' '.$langs->trans("NotSlowedDownByThis").''; } else { if ($conf->global->SYSLOG_LEVEL > LOG_NOTICE) { print img_picto('', 'warning').' '.$langs->trans("ModuleActivatedWithTooHighLogLevel", $langs->transnoentities("Syslog")); @@ -91,7 +91,7 @@ print '
'; print ''.$langs->trans("DebugBar").': '; $test = empty($conf->debugbar->enabled); if ($test) { - print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled").' - '.$langs->trans("NotSlowedDownByThis"); + print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled").' '.$langs->trans("NotSlowedDownByThis").''; } else { print img_picto('', 'warning').' '.$langs->trans("ModuleActivated", $langs->transnoentities("DebugBar")); //print ' '.$langs->trans("MoreInformation").' XDebug admin page'; @@ -111,7 +111,7 @@ if ($test) { print ' Memcached module admin page'; } } else { - print img_picto('', 'warning').' '.$langs->trans("MemcachedNotAvailable"); + print $langs->trans("MemcachedNotAvailable"); } print '
'; diff --git a/htdocs/admin/system/security.php b/htdocs/admin/system/security.php index 087ad76631d..ff054a13ce0 100644 --- a/htdocs/admin/system/security.php +++ b/htdocs/admin/system/security.php @@ -66,7 +66,26 @@ if (function_exists('php_ini_loaded_file')) { print "
\n"; // Get versionof web server -print "
Web server - ".$langs->trans("Version").": ".$_SERVER["SERVER_SOFTWARE"]."
\n"; +print "
Web server - ".$langs->trans("Version").": ".$_SERVER["SERVER_SOFTWARE"]."
\n"; +print ''.$langs->trans("DataRootServer").": ".DOL_DATA_ROOT."
\n"; +// Web user group by default +$labeluser = dol_getwebuser('user'); +$labelgroup = dol_getwebuser('group'); +if ($labeluser && $labelgroup) { + print ''.$langs->trans("WebUserGroup")." (env vars) : ".$labeluser.':'.$labelgroup; + if (function_exists('posix_geteuid') && function_exists('posix_getpwuid')) { + $arrayofinfoofuser = posix_getpwuid(posix_geteuid()); + print ' (POSIX '.$arrayofinfoofuser['name'].':'.$arrayofinfoofuser['gecos'].':'.$arrayofinfoofuser['dir'].':'.$arrayofinfoofuser['shell'].')
'."\n"; + } +} +// Web user group real (detected by 'id' external command) +if (function_exists('exec')) { + $arrayout = array(); $varout = 0; + exec('id', $arrayout, $varout); + if (empty($varout)) { // Test command is ok. Work only on Linux OS. + print ''.$langs->trans("WebUserGroup")." (real, 'id' command) : ".join(',', $arrayout)."
\n"; + } +} print '
'; print "PHP safe_mode = ".(ini_get('safe_mode') ? ini_get('safe_mode') : yn(0)).'   '.$langs->trans("Deprecated")." (removed in PHP 5.4)
\n";