mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-09-05 10:18:33 +08:00
[Legacy] Update snooze to read user preference
This commit is contained in:
parent
cf87748a6e
commit
12f5573323
1 changed files with 8 additions and 4 deletions
|
@ -76,11 +76,15 @@ class Alert extends Basic
|
|||
|
||||
public function snoozeUntil() {
|
||||
|
||||
global $sugar_config;
|
||||
global $current_user;
|
||||
|
||||
require_once 'modules/Configurator/Configurator.php';
|
||||
$configurator = new Configurator();
|
||||
$snoozeTimer = $configurator->config['snooze_alert_timer'] ?? $sugar_config['snooze_alert_timer'] ?? '';
|
||||
$preference = $current_user->getPreference('snooze_alert_timer') ?? null;
|
||||
|
||||
if (empty($preference)){
|
||||
require_once 'modules/Configurator/Configurator.php';
|
||||
$configurator = new Configurator();
|
||||
$snoozeTimer = $configurator->config['snooze_alert_timer'] ?? $sugar_config['snooze_alert_timer'] ?? '';
|
||||
}
|
||||
|
||||
if (empty($snoozeTimer) || !is_numeric($snoozeTimer)) {
|
||||
$snoozeTimer = 600;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue