浏览代码

Update Post page

Use the link from the post to redirect.
Visman 4 年之前
父节点
当前提交
75e8387b09
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/Models/Pages/Post.php

+ 1 - 1
app/Models/Pages/Post.php

@@ -327,6 +327,6 @@ class Post extends Page
             }
         }
 
-        return $this->c->Redirect->page('ViewPost', ['id' => $merge ? $lastPost->id : $post->id])->message('Post redirect');
+        return $this->c->Redirect->url($merge ? $lastPost->link : $post->link)->message('Post redirect');
     }
 }