]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge pull request #1496 from wallabag/v2-redirect-after-deletion
authorJeremy Benoist <j0k3r@users.noreply.github.com>
Thu, 22 Oct 2015 07:28:54 +0000 (09:28 +0200)
committerJeremy Benoist <j0k3r@users.noreply.github.com>
Thu, 22 Oct 2015 07:28:54 +0000 (09:28 +0200)
fix #1005 V2 redirect after deletion

src/Wallabag/CoreBundle/Controller/EntryController.php

index f7b52eaf71b4de811dedc7173d78eae51935d181..6769799b7f35e2f6693311fac517d4e4f1d723bd 100644 (file)
@@ -324,7 +324,7 @@ class EntryController extends Controller
      *
      * @return \Symfony\Component\HttpFoundation\RedirectResponse
      */
-    public function deleteEntryAction(Entry $entry)
+    public function deleteEntryAction(Request $request, Entry $entry)
     {
         $this->checkUserAction($entry);
 
@@ -337,7 +337,7 @@ class EntryController extends Controller
             'Entry deleted'
         );
 
-        return $this->redirect($this->generateUrl('homepage'));
+        return $this->redirect($request->headers->get('referer'));
     }
 
     /**