Use isModEnabled
This commit is contained in:
parent
3ccb87e1fb
commit
ebba133880
@ -25,7 +25,7 @@ require '../../main.inc.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
if (!empty($conf->project->enabled)) {
|
if (isModEnabled('project')) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||||
}
|
}
|
||||||
@ -68,7 +68,7 @@ if ($action == 'setlib' && $user->rights->tax->charges->creer) {
|
|||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
if (!empty($conf->project->enabled)) {
|
if (isModEnabled('project')) {
|
||||||
$formproject = new FormProjets($db);
|
$formproject = new FormProjets($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ $morehtmlref = '<div class="refidno">';
|
|||||||
$morehtmlref .= $form->editfieldkey("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1);
|
$morehtmlref .= $form->editfieldkey("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1);
|
||||||
$morehtmlref .= $form->editfieldval("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1);
|
$morehtmlref .= $form->editfieldval("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1);
|
||||||
// Project
|
// Project
|
||||||
if (!empty($conf->project->enabled)) {
|
if (isModEnabled('project')) {
|
||||||
$langs->load("projects");
|
$langs->load("projects");
|
||||||
$morehtmlref .= '<br>'.$langs->trans('Project').' : ';
|
$morehtmlref .= '<br>'.$langs->trans('Project').' : ';
|
||||||
if (!empty($object->fk_project)) {
|
if (!empty($object->fk_project)) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user