From 0e99d7982c80aed694f80fdf2d221b6445fb4414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Jakes=CC=8C?= Date: Fri, 31 May 2019 15:27:33 +0200 Subject: [PATCH] Don't display inactive subscribers notice when time range changed [MAILPOET-2088] --- lib/Util/Notices/InactiveSubscribersNotice.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Util/Notices/InactiveSubscribersNotice.php b/lib/Util/Notices/InactiveSubscribersNotice.php index 30823609c8..8c980c635e 100644 --- a/lib/Util/Notices/InactiveSubscribersNotice.php +++ b/lib/Util/Notices/InactiveSubscribersNotice.php @@ -28,6 +28,12 @@ class InactiveSubscribersNotice { return; } + // don't display notice if user has changed the default inactive time range + $inactive_days = $this->settings->get('deactivate_subscriber_after_inactive_days'); + if ($inactive_days !== SettingsController::DEFAULT_DEACTIVATE_SUBSCRIBER_AFTER_INACTIVE_DAYS) { + return; + } + $inactive_subscribers_count = Subscriber::getInactiveSubscribersCount(); if ($inactive_subscribers_count < self::MIN_INACTIVE_SUBSCRIBERS_COUNT) { return;