From: Matthias Schmidt Date: Sat, 9 Feb 2019 10:01:56 +0000 (+0100) Subject: Fix reloading exception log page losing filter parameters X-Git-Tag: 5.2.0_Alpha_1~302 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=57d9edd1b6783910d030075d21c28bed08525d54;p=GitHub%2FWoltLab%2FWCF.git Fix reloading exception log page losing filter parameters Close #2830 --- 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); } /**