Browse Source

* Fix redirect link after deleting topic

Visman 6 years ago
parent
commit
79026a06e4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/Models/Pages/Delete.php

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

@@ -45,7 +45,7 @@ class Delete extends Page
             $this->c->DB->beginTransaction();
             $this->c->DB->beginTransaction();
 
 
             if ($deleteTopic) {
             if ($deleteTopic) {
-                $redirect = $this->c->Redirect->page('Forum', ['id' => $topic->forum_id])->message('Topic del redirect');
+                $redirect = $this->c->Redirect->page('Forum', ['id' => $topic->forum_id, 'name' => $topic->parent->forum_name])->message('Topic del redirect');
                 $this->c->topics->delete($topic);
                 $this->c->topics->delete($topic);
             } else {
             } else {
                 $redirect = $this->c->Redirect->page('ViewPost', ['id' => $this->c->posts->previousPost($post)])->message('Post del redirect');
                 $redirect = $this->c->Redirect->page('ViewPost', ['id' => $this->c->posts->previousPost($post)])->message('Post del redirect');