From 6ee83c7773076ff26384669508ec9d2e7b9c4b8c Mon Sep 17 00:00:00 2001 From: Robbie Antenesse Date: Sun, 14 Jul 2019 15:33:21 -0600 Subject: [PATCH] Don't render announcements if dismissed --- src/php/router.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/php/router.php b/src/php/router.php index 08f46a1..07f382b 100644 --- a/src/php/router.php +++ b/src/php/router.php @@ -80,6 +80,10 @@ switch ($view) { $announcements = json_decode($announcements, true); $announcements_html = ''; foreach ($announcements as $announcement) { + if (isset($announcement['dismissId']) && isset($_COOKIE['announcement-' . $announcement['dismissId']])) { + continue; + } + $expire = strtotime($announcement['expire']); if (time() < $expire) { $announcements_html .= '