From 57d9edd1b6783910d030075d21c28bed08525d54 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 9 Feb 2019 11:01:56 +0100 Subject: [PATCH] Fix reloading exception log page losing filter parameters Close #2830 --- .../lib/acp/page/ExceptionLogViewPage.class.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php b/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php index a6b0139ab9..48f880a46d 100644 --- a/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php @@ -5,6 +5,7 @@ use wcf\page\MultipleLinkPage; use wcf\system\event\EventHandler; use wcf\system\exception\IllegalLinkException; use wcf\system\Regex; +use wcf\system\request\LinkHandler; use wcf\system\WCF; use wcf\util\DirectoryUtil; use wcf\util\JSON; @@ -40,6 +41,11 @@ class ExceptionLogViewPage extends MultipleLinkPage { */ public $exceptionID = ''; + /** + * @inheritDoc + */ + public $forceCanonicalURL = true; + /** * active logfile * @var string @@ -66,6 +72,16 @@ class ExceptionLogViewPage extends MultipleLinkPage { if (isset($_REQUEST['exceptionID'])) $this->exceptionID = StringUtil::trim($_REQUEST['exceptionID']); if (isset($_REQUEST['logFile'])) $this->logFile = StringUtil::trim($_REQUEST['logFile']); + + $parameters = []; + if ($this->exceptionID !== '') { + $parameters['exceptionID'] = $this->exceptionID; + } + else if ($this->logFile !== '') { + $parameters['logFile'] = $this->logFile; + } + + $this->canonicalURL = LinkHandler::getInstance()->getControllerLink(self::class, $parameters); } /** -- 2.20.1