Use isModEnabled

This commit is contained in:
Alexandre SPANGARO 2022-09-25 06:18:33 +02:00
parent a6040867c8
commit 3bb28205a3
5 changed files with 6 additions and 6 deletions

View File

@ -165,7 +165,7 @@ class BlockedLog
*/
// Donation
if (!empty($conf->don->enabled)) {
if (isModEnabled('don')) {
$this->trackedevents['DON_VALIDATE'] = 'logDON_VALIDATE';
$this->trackedevents['DON_DELETE'] = 'logDON_DELETE';
//$this->trackedevents['DON_SENTBYMAIL']='logDON_SENTBYMAIL';

View File

@ -1634,7 +1634,7 @@ class FormMail extends Form
if (isModEnabled('adherent')) {
$tmparray['__SECUREKEYPAYMENT_MEMBER__'] = 'SecureKeyPAYMENTUniquePerMember';
}
if (!empty($conf->don->enabled)) {
if (isModEnabled('don')) {
$tmparray['__SECUREKEYPAYMENT_DONATION__'] = 'SecureKeyPAYMENTUniquePerDonation';
}
if (isModEnabled('facture')) {
@ -1651,7 +1651,7 @@ class FormMail extends Form
if (isModEnabled('adherent')) {
$tmparray['__ONLINEPAYMENTLINK_MEMBER__'] = 'OnlinePaymentLinkUniquePerMember';
}
if (!empty($conf->don->enabled)) {
if (isModEnabled('don')) {
$tmparray['__ONLINEPAYMENTLINK_DONATION__'] = 'OnlinePaymentLinkUniquePerDonation';
}
if (isModEnabled('facture')) {

View File

@ -177,7 +177,7 @@ function project_prepare_head(Project $project, $moreparam = '')
if (isModEnabled('expensereport')) {
$nbElements += $project->getElementCount('expensereport', 'expensereport');
}
if (!empty($conf->don->enabled)) {
if (isModEnabled('don')) {
$nbElements += $project->getElementCount('donation', 'don');
}
if (!empty($conf->loan->enabled)) {

View File

@ -180,7 +180,7 @@ class modCategorie extends DolibarrModules
$this->export_code[$r] = $this->rights_class.'_0_'.Categorie::$MAP_ID_TO_CODE[0];
$this->export_label[$r] = 'CatProdList';
$this->export_icon[$r] = $this->picto;
$this->export_enabled[$r] = 'isModEnabled("product") || !empty($conf->service->enabled)';
$this->export_enabled[$r] = 'isModEnabled("product") || isModEnabled('service')';
$this->export_permission[$r] = array(array("categorie", "lire"), array("produit", "export"));
$this->export_fields_array[$r] = array('cat.rowid'=>"CategId", 'cat.label'=>"Label", 'cat.description'=>"Description", 'cat.fk_parent'=>"ParentCategoryID", 'pcat.label'=>"ParentCategoryLabel", 'p.rowid'=>'ProductId', 'p.ref'=>'Ref', 'p.label'=>'Label');
$this->export_TypeFields_array[$r] = array('cat.rowid'=>'Numeric', 'cat.label'=>"Text", 'cat.description'=>"Text", 'cat.fk_parent'=>'Numeric', 'pcat.label'=>'Text', 'p.rowid'=>'Numeric', 'p.ref'=>'Text', 'p.label'=>'Text');

View File

@ -118,7 +118,7 @@ if (isModEnabled('adherent')) {
}
print '<br>';
}
if (!empty($conf->don->enabled)) {
if (isModEnabled('don')) {
print '<div id="donation"></div>';
print img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("ToOfferALinkForOnlinePaymentOnDonation", $servicename).':</span><br>';
print '<strong class="wordbreak">'.getOnlinePaymentUrl(1, 'donation')."</strong><br>\n";