From: Tim Düsterhus Date: Tue, 5 Mar 2019 13:31:31 +0000 (+0100) Subject: Mark Exceptions as read when ExceptionLogViewPage is accessed X-Git-Tag: 5.2.0_Alpha_1~220^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6e40d90876360b5377e1685843558b7e3aca9f52;p=GitHub%2FWoltLab%2FWCF.git Mark Exceptions as read when ExceptionLogViewPage is accessed see #2654 --- 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);