Use isModEnabled

This commit is contained in:
Alexandre SPANGARO 2022-08-29 10:53:01 +02:00
parent ccea57423a
commit eae6118d40

View File

@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/salaries.lib.php';
require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php';
if (!empty($conf->project->enabled)) {
if (isModEnabled('project')) {
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
}
@ -132,7 +132,7 @@ if ($action == 'setlabel' && $user->rights->salaries->write) {
*/
$form = new Form($db);
if (!empty($conf->project->enabled)) $formproject = new FormProjets($db);
if (isModEnabled('projet')) $formproject = new FormProjets($db);
$title = $langs->trans('Salary')." - ".$langs->trans('Documents');
$help_url = "";
@ -176,7 +176,7 @@ if ($object->id) {
$morehtmlref .= '<br>'.$langs->trans('Employee').' : '.$userstatic->getNomUrl(-1);
// Project
if (!empty($conf->project->enabled)) {
if (isModEnabled('projet')) {
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
if ($user->rights->salaries->write) {
if ($action != 'classify') {