Fixed duplicate link rel="canonical" tags
authorMarcel Werk <burntime@woltlab.com>
Thu, 23 Jun 2016 16:09:16 +0000 (18:09 +0200)
committerMarcel Werk <burntime@woltlab.com>
Thu, 23 Jun 2016 16:09:16 +0000 (18:09 +0200)
files/lib/page/LegalNoticePage.class.php
templates/legalNotice.tpl

index 90b7c6b3c4ddc3642cf5c6b5226836fe40d39697..a1880b70c111e4241c53066f6bfc22ca4cb38779 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 namespace wcf\page;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\StringUtil;
 
@@ -17,7 +18,11 @@ class LegalNoticePage extends AbstractPage {
        /**
         * @inheritDoc
         */
-       public $activeMenuItem = 'wcf.footer.menu.legalNotice';
+       public function readParameters() {
+               parent::readParameters();
+               
+               $this->canonicalURL = LinkHandler::getInstance()->getLink('LegalNotice');
+       }
        
        /**
         * @inheritDoc
index e3f126a65a19e870b04bafc8ae0c06a172479cfa..a965974b2f12f9f773b2dcb9e881247609516248 100644 (file)
@@ -1,9 +1,5 @@
 {capture assign='contentDescription'}{lang}wcf.legalNotice.description{/lang}{/capture}
 
-{capture assign='headContent'}
-       <link rel="canonical" href="{link controller='LegalNotice'}{/link}">
-{/capture}
-
 {include file='header'}
 
 <section class="section">