Fixed duplicate link rel="canonical" tags
authorMarcel Werk <burntime@woltlab.com>
Thu, 23 Jun 2016 16:09:34 +0000 (18:09 +0200)
committerMarcel Werk <burntime@woltlab.com>
Thu, 23 Jun 2016 16:09:41 +0000 (18:09 +0200)
com.woltlab.wcf/templates/recentActivityList.tpl
com.woltlab.wcf/templates/team.tpl
com.woltlab.wcf/templates/user.tpl
com.woltlab.wcf/templates/usersOnlineList.tpl
wcfsetup/install/files/lib/page/RecentActivityListPage.class.php
wcfsetup/install/files/lib/page/TeamPage.class.php

index 71d41cca7a1b81f1ca2be86e940e992ab6ebec5b..6c462c479eb08db06019df5300a7c9764b5bb3b1 100644 (file)
@@ -1,7 +1,3 @@
-{capture assign='headContent'}
-       <link rel="canonical" href="{link controller='RecentActivityList'}{/link}">
-{/capture}
-
 {include file='header'}
 
 {if $eventList|count}
index 3ebeb973df091784f4849253680d28ed60883366..5491624da6fb50b82738fe57436f0265dec6823d 100644 (file)
@@ -1,7 +1,3 @@
-{capture assign='headContent'}
-       <link rel="canonical" href="{link controller='Team'}{/link}">
-{/capture}
-
 {include file='header'}
 
 {foreach from=$objects->getTeams() item=team}
index 016050893d12cf5b1a1b601fbbb0b598b06d3162..c6484b8614ce462b22c1bba057504bfb4168891c 100644 (file)
@@ -3,8 +3,6 @@
 {assign var='contentHeader' value=' '}{* necessary to hide default content header in heade.tpl *}
 
 {capture assign='headContent'}
-       <link rel="canonical" href="{link controller='User' object=$user}{/link}">
-       
        {event name='javascriptInclude'}
        <script data-relocate="true">
                {if $__wcf->getUser()->userID && $__wcf->getUser()->userID != $user->userID}
index 0cc97028baaa5f57893dbedbbd755c986a90a8b5..e183415a809dd52ce09cbc4b167b6584279917f2 100644 (file)
@@ -1,7 +1,7 @@
 {capture assign='pageTitle'}{$__wcf->getActivePage()->getTitle()}{if $pageNo > 1} - {lang}wcf.page.pageNo{/lang}{/if}{/capture}
 
 {capture assign='headContent'}
-       <link rel="canonical" href="{link controller='UsersOnlineList'}{/link}">
+       <link rel="canonical" href="{link controller='UsersOnlineList'}{if $pageNo > 1}pageNo={@$pageNo}{/if}{/link}">
        
        {if USERS_ONLINE_PAGE_REFRESH > 0}
                <meta http-equiv="refresh" content="{@USERS_ONLINE_PAGE_REFRESH}; url={link controller='UsersOnlineList'}{if $pageNo > 1}pageNo={@$pageNo}&{/if}sortField={@$sortField}&sortOrder={@$sortOrder}{/link}">
index 30da4765837ed759f8aaf7842267437c431d71f4..d018bb58b1c7ed052b60c70a7bc2c246f26c2587 100644 (file)
@@ -2,6 +2,7 @@
 namespace wcf\page;
 use wcf\data\user\activity\event\ViewableUserActivityEventList;
 use wcf\system\page\PageLocationManager;
+use wcf\system\request\LinkHandler;
 use wcf\system\user\activity\event\UserActivityEventHandler;
 use wcf\system\WCF;
 
@@ -20,6 +21,15 @@ class RecentActivityListPage extends AbstractPage {
         */
        public $eventList = null;
        
+       /**
+        * @inheritDoc
+        */
+       public function readParameters() {
+               parent::readParameters();
+               
+               $this->canonicalURL = LinkHandler::getInstance()->getLink('RecentActivityList');
+       }
+       
        /**
         * @inheritDoc
         */
index a0d2aa4e4711ae52e08354280d7771ed530aae87..5963701be0962a4eea00f0e41273c75efea0fdfe 100644 (file)
@@ -2,6 +2,7 @@
 namespace wcf\page;
 use wcf\data\user\TeamList;
 use wcf\system\page\PageLocationManager;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 
 /**
@@ -45,6 +46,15 @@ class TeamPage extends MultipleLinkPage {
         */
        public $objectListClassName = TeamList::class;
        
+       /**
+        * @inheritDoc
+        */
+       public function readParameters() {
+               parent::readParameters();
+               
+               $this->canonicalURL = LinkHandler::getInstance()->getLink('Team');
+       }
+       
        /**
         * @inheritDoc
         */