Merge branch 'master' into next
authorJoshua Rüsweg <josh@bastelstu.be>
Sat, 2 Mar 2019 19:40:08 +0000 (20:40 +0100)
committerJoshua Rüsweg <josh@bastelstu.be>
Sat, 2 Mar 2019 19:40:08 +0000 (20:40 +0100)
1  2 
wcfsetup/install/files/lib/page/TrophyListPage.class.php
wcfsetup/install/files/lib/page/TrophyPage.class.php
wcfsetup/install/files/lib/system/captcha/CaptchaQuestionHandler.class.php

index 30e291eaef4b7621a2cba6e96117f4267bcb21d0,89c0046fc5efd63fa1b174d969939a355d129de5..4c61154317239948cbfa5fb461076eb94d64c71f
@@@ -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;
        
 -              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 : ''));
+       /**
+        * @inheritDoc
+        */
+       public function readParameters() {
+               parent::readParameters();
+               
++              $this->canonicalURL = LinkHandler::getInstance()->getLink('TrophyList', [], ($this->pageNo > 1 ? 'pageNo=' . $this->pageNo : ''));
+       }
+       
        /**
         * @inheritDoc
         */
index 74d5295fc3bb6b3ff8cda51cbd49239189d526b7,02b8ae80cbf5d75071c94b4a42761aa48b48fa88..88f774589522c5e3287bc2bf8f9505c6024a6b3e
@@@ -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 : ''));
        }
        
        /**