From 2104ab9aed537436a4754dc66b2300cb125fe6e2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 21 Aug 2017 13:11:29 +0200 Subject: [PATCH] Disable event reminder --- htdocs/comm/action/class/actioncomm.class.php | 10 ++++++++++ htdocs/core/modules/modAgenda.class.php | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index f6d6b4a0975..704f307283e 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1509,9 +1509,19 @@ class ActionComm extends CommonObject { global $conf, $langs; + $this->output = ''; + $this->error=''; + + if (empty($conf->global->AGENDA_REMINDER_EMAIL)) + { + $this->output = $langs->trans('EventRemindersByEmailNotEnabled', $langs->transnoentitiesnoconv("Agenda")); + return 0; + } + dol_syslog(__METHOD__, LOG_DEBUG); + return 0; } diff --git a/htdocs/core/modules/modAgenda.class.php b/htdocs/core/modules/modAgenda.class.php index 1c893cfbc59..da33e307b16 100644 --- a/htdocs/core/modules/modAgenda.class.php +++ b/htdocs/core/modules/modAgenda.class.php @@ -108,7 +108,7 @@ class modAgenda extends DolibarrModules // Cronjobs //------------ $this->cronjobs = array( - 0=>array('label'=>'SendEmailsReminders', 'jobtype'=>'method', 'class'=>'comm/action/class/actioncomm.class.php', 'objectname'=>'ActionComm', 'method'=>'sendEmailsReminder', 'parameters'=>'', 'comment'=>'SendEMailsReminder', 'frequency'=>10, 'unitfrequency'=>60, 'priority'=>10, 'status'=>1, 'test'=>'$conf->global->MAIN_FEATURES_LEVEL > 0'), + 0=>array('label'=>'SendEmailsReminders', 'jobtype'=>'method', 'class'=>'comm/action/class/actioncomm.class.php', 'objectname'=>'ActionComm', 'method'=>'sendEmailsReminder', 'parameters'=>'', 'comment'=>'SendEMailsReminder', 'frequency'=>10, 'unitfrequency'=>60, 'priority'=>10, 'status'=>1, 'test'=>'1'), // 1=>array('label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>1, 'unitfrequency'=>3600*24) );