소스 검색

Fix for the previous

Visman 1 년 전
부모
커밋
acaad2db29
2개의 변경된 파일16개의 추가작업 그리고 2개의 파일을 삭제
  1. 8 1
      app/Models/Pages/Forum.php
  2. 8 1
      app/Models/Pages/Topic.php

+ 8 - 1
app/Models/Pages/Forum.php

@@ -44,7 +44,14 @@ class Forum extends Page
 
 
         $this->nameTpl    = 'forum';
         $this->nameTpl    = 'forum';
         $this->onlinePos  = 'forum-' . $args['id'];
         $this->onlinePos  = 'forum-' . $args['id'];
-        $this->canonical  = $forum->link;
+        $this->canonical  = $this->c->Router->link(
+            'Forum',
+            [
+                'id'   => $args['id'],
+                'name' => $this->c->Func->friendly($forum->forum_name),
+                'page' => $forum->page,
+            ]
+        );
         $this->model      = $forum;
         $this->model      = $forum;
         $this->topics     = $forum->pageData();
         $this->topics     = $forum->pageData();
         $this->crumbs     = $this->crumbs($forum);
         $this->crumbs     = $this->crumbs($forum);

+ 8 - 1
app/Models/Pages/Topic.php

@@ -136,7 +136,14 @@ class Topic extends Page
         $this->nameTpl      = 'topic';
         $this->nameTpl      = 'topic';
         $this->onlinePos    = 'topic-' . $topic->id;
         $this->onlinePos    = 'topic-' . $topic->id;
         $this->onlineDetail = true;
         $this->onlineDetail = true;
-        $this->canonical    = $topic->link;
+        $this->canonical    = $this->c->Router->link(
+            'Topic',
+            [
+                'id'   => $topic->id,
+                'name' => $this->c->Func->friendly($topic->name),
+                'page' => $topic->page,
+            ]
+        );
         $this->model        = $topic;
         $this->model        = $topic;
         $this->crumbs       = $this->crumbs($topic);
         $this->crumbs       = $this->crumbs($topic);
         $this->online       = $this->c->Online->calc($this)->info();
         $this->online       = $this->c->Online->calc($this)->info();