Mark Exceptions as read when ExceptionLogViewPage is accessed
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 5 Mar 2019 13:31:31 +0000 (14:31 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 5 Mar 2019 13:31:31 +0000 (14:31 +0100)
see #2654

wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php

index d5cc42c700edf82221bea2461d68dc0c80847e5c..a6e8447a08db9900da5303f0f87f89a992924c8e 100644 (file)
@@ -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);