From 6e40d90876360b5377e1685843558b7e3aca9f52 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 5 Mar 2019 14:31:31 +0100 Subject: [PATCH] Mark Exceptions as read when ExceptionLogViewPage is accessed see #2654 --- .../files/lib/acp/page/ExceptionLogViewPage.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php b/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php index d5cc42c700..a6e8447a08 100644 --- a/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php @@ -4,8 +4,9 @@ use wcf\page\AbstractPage; use wcf\page\MultipleLinkPage; use wcf\system\event\EventHandler; use wcf\system\exception\IllegalLinkException; -use wcf\system\Regex; +use wcf\system\registry\RegistryHandler; use wcf\system\request\LinkHandler; +use wcf\system\Regex; use wcf\system\WCF; use wcf\util\DirectoryUtil; use wcf\util\ExceptionLogUtil; @@ -90,6 +91,9 @@ class ExceptionLogViewPage extends MultipleLinkPage { public function readData() { AbstractPage::readData(); + // mark notifications as read + RegistryHandler::getInstance()->set('com.woltlab.wcf', 'exceptionMailerTimestamp', TIME_NOW); + $fileNameRegex = new Regex('(?:^|/)\d{4}-\d{2}-\d{2}\.txt$'); $this->logFiles = DirectoryUtil::getInstance(WCF_DIR.'log/')->getFiles(SORT_DESC, $fileNameRegex); -- 2.20.1