mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-09-05 10:18:33 +08:00
[Legacy] Fix Alert snooze time calculation
This commit is contained in:
parent
f4c29e4492
commit
c5e47b21ef
1 changed files with 8 additions and 3 deletions
|
@ -78,10 +78,15 @@ class Alert extends Basic
|
|||
|
||||
global $sugar_config;
|
||||
|
||||
$snoozeTimer = $sugar_config['snooze_alert_timer'];
|
||||
$snoozeUntil = date("Y-m-d H:i:s", strtotime("+ $snoozeTimer sec"));
|
||||
require_once 'modules/Configurator/Configurator.php';
|
||||
$configurator = new Configurator();
|
||||
$snoozeTimer = $configurator->config['snooze_alert_timer'] ?? $sugar_config['snooze_alert_timer'] ?? '';
|
||||
|
||||
return $snoozeUntil;
|
||||
if (empty($snoozeTimer) || !is_numeric($snoozeTimer)) {
|
||||
$snoozeTimer = 600;
|
||||
}
|
||||
|
||||
return date("Y-m-d H:i:s", strtotime("+ $snoozeTimer sec"));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue