From f39ad2359a91968abc931d30b58e8696cfa7b878 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 21 Nov 2020 17:01:17 +0100 Subject: [PATCH] Debug --- htdocs/admin/agenda_reminder.php | 19 ++++++++++++++----- htdocs/langs/en_US/admin.lang | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/htdocs/admin/agenda_reminder.php b/htdocs/admin/agenda_reminder.php index 3572ad47d63..7558d0097de 100644 --- a/htdocs/admin/agenda_reminder.php +++ b/htdocs/admin/agenda_reminder.php @@ -207,9 +207,22 @@ if (empty($conf->global->AGENDA_REMINDER_BROWSER)) { print ''."\n"; } +$job = new Cronjob($db); +$job->fetch(0, 'ActionComm', 'sendEmailsReminder'); + // AGENDA REMINDER EMAIL print ''."\n"; -print ''.$langs->trans('AGENDA_REMINDER_EMAIL', $langs->transnoentities("Module2300Name")).''."\n"; +print ''.$langs->trans('AGENDA_REMINDER_EMAIL', $langs->transnoentities("Module2300Name")); +if (!empty($conf->cron->enabled)) { + if (!empty($conf->global->AGENDA_REMINDER_EMAIL)) { + if ($job->id > 0) { + if ($job->status == $job::STATUS_ENABLED) { + print '
'.$langs->trans("AGENDA_REMINDER_EMAIL_NOTE", $langs->transnoentitiesnoconv("sendEmailsReminder")).''; + } + } + } +} +print ''."\n"; print ' '."\n"; print ''."\n"; @@ -220,15 +233,11 @@ if (empty($conf->cron->enabled)) { print ''.img_picto($langs->trans('Disabled'), 'switch_off').''; } else { // Get the max frequency of reminder - // TODO Read frequency of the job sendEmailsReminder and if job is enabled - $job = new Cronjob($db); - $job->fetch(0, 'ActionComm', 'sendEmailsReminder'); if ($job->id > 0) { if ($job->status != $job::STATUS_ENABLED) { print ''.$langs->trans("JobXMustBeEnabled", $langs->transnoentitiesnoconv("sendEmailsReminder")).''; } else { print ''.img_picto($langs->trans('Enabled'), 'switch_on').''; - print '
'.$langs->trans("AGENDA_REMINDER_EMAIL_NOTE", $langs->transnoentitiesnoconv("sendEmailsReminder")).''; } } } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 7534ba46123..94d1d1b2c47 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1741,7 +1741,7 @@ AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting men AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (When remind date is reached, a popup is shown by the browser. Each user can disable such notifications from its browser notification setup). AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). -AGENDA_REMINDER_EMAIL_NOTE=The frequency of the task %s must be enough to be sure that the remind are sent at the correct moment. +AGENDA_REMINDER_EMAIL_NOTE=Note: The frequency of the task %s must be enough to be sure that the remind are sent at the correct moment. AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup