浏览代码

Use isModEnabled

Alexandre SPANGARO 2 年之前
父节点
当前提交
3cf2048518

+ 1 - 1
htdocs/societe/partnership.php

@@ -164,7 +164,7 @@ if ($id > 0) {
 	$object = new Societe($db);
 	$object = new Societe($db);
 	$result = $object->fetch($id);
 	$result = $object->fetch($id);
 
 
-	if (!empty($conf->notification->enabled)) {
+	if (isModEnabled('notification')) {
 		$langs->load("mails");
 		$langs->load("mails");
 	}
 	}
 	$head = societe_prepare_head($object);
 	$head = societe_prepare_head($object);

+ 1 - 1
htdocs/societe/price.php

@@ -199,7 +199,7 @@ $object = new Societe($db);
 $result = $object->fetch($socid);
 $result = $object->fetch($socid);
 llxHeader("", $langs->trans("ThirdParty").'-'.$langs->trans('PriceByCustomer'));
 llxHeader("", $langs->trans("ThirdParty").'-'.$langs->trans('PriceByCustomer'));
 
 
-if (!empty($conf->notification->enabled)) {
+if (isModEnabled('notification')) {
 	$langs->load("mails");
 	$langs->load("mails");
 }
 }
 $head = societe_prepare_head($object);
 $head = societe_prepare_head($object);

+ 1 - 1
htdocs/societe/project.php

@@ -84,7 +84,7 @@ if ($socid) {
 	}
 	}
 	llxHeader('', $title);
 	llxHeader('', $title);
 
 
-	if (!empty($conf->notification->enabled)) {
+	if (isModEnabled('notification')) {
 		$langs->load("mails");
 		$langs->load("mails");
 	}
 	}
 	$head = societe_prepare_head($object);
 	$head = societe_prepare_head($object);

+ 1 - 1
htdocs/supplier_proposal/card.php

@@ -1530,7 +1530,7 @@ if ($action == 'create') {
 		}
 		}
 
 
 		$text = $langs->trans('ConfirmValidateAsk', $numref);
 		$text = $langs->trans('ConfirmValidateAsk', $numref);
-		if (!empty($conf->notification->enabled)) {
+		if (isModEnabled('notification')) {
 			require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
 			require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
 			$notify = new Notify($db);
 			$notify = new Notify($db);
 			$text .= '<br>';
 			$text .= '<br>';

+ 1 - 1
htdocs/user/document.php

@@ -140,7 +140,7 @@ if ($object->id) {
 	/*
 	/*
 	 * Affichage onglets
 	 * Affichage onglets
 	 */
 	 */
-	if (!empty($conf->notification->enabled)) {
+	if (isModEnabled('notification')) {
 		$langs->load("mails");
 		$langs->load("mails");
 	}
 	}
 	$head = user_prepare_head($object);
 	$head = user_prepare_head($object);