浏览代码

The link to the topic left for the link to the topic must point to the original topic

Visman 1 年之前
父节点
当前提交
dd4cca2680
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      app/Models/Topic/Move.php

+ 2 - 1
app/Models/Topic/Move.php

@@ -29,6 +29,7 @@ class Move extends Action
             if ($topic->parent === $toForum) {
             if ($topic->parent === $toForum) {
                 continue;
                 continue;
             }
             }
+
             if ($redirect) {
             if ($redirect) {
                 $rTopic                 = $this->c->topics->create();
                 $rTopic                 = $this->c->topics->create();
                 $rTopic->poster         = $topic->poster;
                 $rTopic->poster         = $topic->poster;
@@ -40,7 +41,7 @@ class Move extends Action
 //                $rTopic->last_post_id   = $topic->last_post_id;
 //                $rTopic->last_post_id   = $topic->last_post_id;
 //                $rTopic->last_poster    = $topic->last_poster;
 //                $rTopic->last_poster    = $topic->last_poster;
 //                $rTopic->last_poster_id = $topic->last_poster_id;
 //                $rTopic->last_poster_id = $topic->last_poster_id;
-                $rTopic->moved_to       = $topic->id;
+                $rTopic->moved_to       = $topic->moved_to ?: $topic->id;
                 $rTopic->forum_id       = $topic->forum_id;
                 $rTopic->forum_id       = $topic->forum_id;
 
 
                 $this->c->topics->insert($rTopic);
                 $this->c->topics->insert($rTopic);