From 2e49ae143f602027fa6bc75fc50589103c6643f9 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 24 Aug 2022 09:57:04 +0200 Subject: [PATCH] FIX php8 compatibility --- htdocs/admin/const.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index a5a68a0bb49..5495c34ca5e 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -185,12 +185,12 @@ print ''; print '
'; print ''; print ''; -print getTitleFieldOfList('Name', 0, $_SERVER['PHP_SELF'], 'name', '', $param, '', $sortfield, $sortorder, '')."\n"; +print getTitleFieldOfList('Name', 0, $_SERVER['PHP_SELF'], 'name', '', $param, '', $sortfield, $sortorder, '') . "\n"; print getTitleFieldOfList("Value", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); print getTitleFieldOfList("Comment", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); -print getTitleFieldOfList('DateModificationShort', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; -if (!empty($conf->multicompany->enabled) && !$user->entity) { - print getTitleFieldOfList('Entity', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; +print getTitleFieldOfList('DateModificationShort', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; +if (isModEnabled('multicompany') && !$user->entity) { + print getTitleFieldOfList('Entity', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; } print getTitleFieldOfList("", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center '); print "\n"; @@ -211,14 +211,14 @@ print ''; print ''; // Limit to superadmin -if (!empty($conf->multicompany->enabled) && !$user->entity) { +if (isModEnabled('multicompany') && !$user->entity) { print ''; print '\n"; @@ -278,14 +278,14 @@ if ($result) { print ''; // Entity limit to superadmin - if (!empty($conf->multicompany->enabled) && !$user->entity) { + if (isModEnabled('multicompany') && !$user->entity) { print ''; print '
'; print ''; - print ''; + print ''; print ''; } else { print ''; - print ''; + print ''; } print ''; print "'; - print ''; + print ''; print ''; } else { print ''; - print ''; + print ''; } if ($conf->use_javascript_ajax) {