Use isModEnabled

This commit is contained in:
Alexandre SPANGARO 2022-09-25 06:26:04 +02:00
parent b1f425b703
commit 37834d3c62
5 changed files with 5 additions and 5 deletions

View File

@ -202,7 +202,7 @@ if (isModEnabled("product") || isModEnabled("service")) {
if (isModEnabled("propal") || isModEnabled('commande') || isModEnabled('ficheinter') || isModEnabled('contrat')) {
$tmparray['comm/index.php?mainmenu=commercial&leftmenu='] = 'CommercialArea';
}
if (!empty($conf->comptabilite->enabled) || isModEnabled('accounting')) {
if (isModEnabled('comptabilite') || isModEnabled('accounting')) {
$tmparray['compta/index.php?mainmenu=compta&leftmenu='] = 'AccountancyTreasuryArea';
}
if (isModEnabled('adherent')) {

View File

@ -163,7 +163,7 @@ if ($object->id > 0) {
// Thirdparty
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
// Project
if (!empty($conf->projet->enabled)) {
if (isModEnabled('projet')) {
$langs->load("projects");
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
if ($permissiontoadd) {

View File

@ -340,7 +340,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// Thirdparty
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
// Project
if (!empty($conf->projet->enabled)) {
if (isModEnabled('projet')) {
$langs->load("projects");
$morehtmlref .= '<br>'.$langs->trans('Project') . ' ';
if ($permissiontoadd) {

View File

@ -146,7 +146,7 @@ if ($object->id) {
// Thirdparty
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
// Project
if (!empty($conf->projet->enabled))
if (isModEnabled('projet'))
{
$langs->load("projects");
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';

View File

@ -121,7 +121,7 @@ if ($id > 0 || !empty($ref)) {
// Thirdparty
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
// Project
if (!empty($conf->projet->enabled))
if (isModEnabled('projet'))
{
$langs->load("projects");
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';