From: Joshua Rüsweg Date: Sat, 2 Mar 2019 19:40:08 +0000 (+0100) Subject: Merge branch 'master' into next X-Git-Tag: 5.2.0_Alpha_1~254 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=24f34147c3a7fae76bc2a0e89c6f2e7a76a54230;p=GitHub%2FWoltLab%2FWCF.git Merge branch 'master' into next --- 24f34147c3a7fae76bc2a0e89c6f2e7a76a54230 diff --cc wcfsetup/install/files/lib/page/TrophyListPage.class.php index 30e291eaef,89c0046fc5..4c61154317 --- a/wcfsetup/install/files/lib/page/TrophyListPage.class.php +++ b/wcfsetup/install/files/lib/page/TrophyListPage.class.php @@@ -3,6 -3,9 +3,7 @@@ namespace wcf\page use wcf\data\trophy\category\TrophyCategory; use wcf\data\trophy\category\TrophyCategoryCache; use wcf\data\trophy\TrophyList; -use wcf\system\exception\IllegalLinkException; -use wcf\system\exception\PermissionDeniedException; + use wcf\system\request\LinkHandler; use wcf\system\WCF; /** @@@ -62,6 -63,29 +63,15 @@@ class TrophyListPage extends MultipleLi */ public $category; + /** + * @inheritDoc + */ + public function readParameters() { + parent::readParameters(); + - if (isset($_REQUEST['id'])) $this->categoryID = intval($_REQUEST['id']); - - $this->category = TrophyCategoryCache::getInstance()->getCategoryByID($this->categoryID); - - if ($this->category === null) { - throw new IllegalLinkException(); - } - - if (!$this->category->isAccessible()) { - throw new PermissionDeniedException(); - } - - $this->canonicalURL = LinkHandler::getInstance()->getLink('TrophyList', [ - 'object' => $this->category - ], ($this->pageNo > 1 ? 'pageNo=' . $this->pageNo : '')); ++ $this->canonicalURL = LinkHandler::getInstance()->getLink('TrophyList', [], ($this->pageNo > 1 ? 'pageNo=' . $this->pageNo : '')); + } + /** * @inheritDoc */ diff --cc wcfsetup/install/files/lib/page/TrophyPage.class.php index 74d5295fc3,02b8ae80cb..88f7745895 --- a/wcfsetup/install/files/lib/page/TrophyPage.class.php +++ b/wcfsetup/install/files/lib/page/TrophyPage.class.php @@@ -99,7 -93,9 +100,11 @@@ class TrophyPage extends MultipleLinkPa throw new PermissionDeniedException(); } + $this->category = $this->trophy->getCategory(); ++ + $this->canonicalURL = LinkHandler::getInstance()->getLink('Trophy', [ + 'object' => $this->trophy + ], ($this->pageNo > 1 ? 'pageNo=' . $this->pageNo : '')); } /**