From a4fbfa23eb5347932c185bf53bb0eae57df73978 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 24 Aug 2022 10:10:03 +0200 Subject: [PATCH] FIX php8 compatibility --- htdocs/admin/hrm.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/admin/hrm.php b/htdocs/admin/hrm.php index cfe40c006b7..c568e6de39c 100644 --- a/htdocs/admin/hrm.php +++ b/htdocs/admin/hrm.php @@ -492,14 +492,14 @@ if ($action == 'edit') { print ''; if ($val['type'] == 'textarea') { - print '\n"; - } elseif ($val['type']== 'integer') { - print '' . "\n"; - } elseif ($val['type']== 'html') { + } elseif ($val['type'] == 'integer') { + print '' . "\n"; + } elseif ($val['type'] == 'html') { require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; - $doleditor = new DolEditor($constname, $conf->global->{$constname}, '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%'); + $doleditor = new DolEditor($constname, $conf->global->{$constname}, '', 160, 'dolibarr_notes', '', false, false, isModEnabled('fckeditor'), ROWS_5, '90%'); $doleditor->Create(); } elseif ($val['type'] == 'yesno') { print $form->selectyesno($constname, $conf->global->{$constname}, 1); @@ -532,25 +532,25 @@ if ($action == 'edit') { print img_picto('', 'category', 'class="pictofixedwidth"'); print $formother->select_categories($tmp[1], $conf->global->{$constname}, $constname, 0, $langs->trans('CustomersProspectsCategoriesShort')); } elseif (preg_match('/thirdparty_type/', $val['type'])) { - require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; + require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; $formcompany = new FormCompany($db); print $formcompany->selectProspectCustomerType($conf->global->{$constname}, $constname); } elseif ($val['type'] == 'securekey') { - print ''; + print ''; if (!empty($conf->use_javascript_ajax)) { - print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token'.$constname.'" class="linkobject"'); + print ' ' . img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token' . $constname . '" class="linkobject"'); } // Add button to autosuggest a key - include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; - print dolJSToSetRandomPassword($constname, 'generate_token'.$constname); + include_once DOL_DOCUMENT_ROOT . '/core/lib/security2.lib.php'; + print dolJSToSetRandomPassword($constname, 'generate_token' . $constname); } elseif ($val['type'] == 'product') { - if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { + if (isModEnabled('product') || isModEnabled('service')) { $selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname); $form->select_produits($selected, $constname, '', 0); } } else { - print ''; + print ''; } print ''; }