Use isModEnabled

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

View File

@ -28,7 +28,7 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/salaries.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
if (!empty($conf->project->enabled)) {
if (isModEnabled('projet')) {
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
}
@ -100,7 +100,7 @@ if ($action == 'setlabel' && $user->rights->salaries->write) {
* View
*/
if (!empty($conf->project->enabled)) $formproject = new FormProjets($db);
if (isModEnabled('projet')) $formproject = new FormProjets($db);
$title = $langs->trans('Salary')." - ".$langs->trans('Info');
$help_url = "";
@ -139,7 +139,7 @@ if ($action != 'editlabel') {
$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') {