]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge pull request #1392 from wallabag/v2-fix-redirect
authorNicolas Lœuillet <nicolas@loeuillet.org>
Mon, 24 Aug 2015 08:44:14 +0000 (10:44 +0200)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Mon, 24 Aug 2015 08:44:14 +0000 (10:44 +0200)
Fix redirect after deletion

src/Wallabag/CoreBundle/Controller/EntryController.php

index b73e9eecd52e5aeb81e0c72e75fdf3a97f0c290a..a77489e250cf0c6b2a9f9bd1d68e291cf6b110e0 100644 (file)
@@ -292,16 +292,15 @@ class EntryController extends Controller
     }
 
     /**
-     * Deletes entry.
+     * Deletes entry and redirect to the homepage.
      *
-     * @param Request $request
-     * @param Entry   $entry
+     * @param Entry $entry
      *
      * @Route("/delete/{id}", requirements={"id" = "\d+"}, name="delete_entry")
      *
      * @return \Symfony\Component\HttpFoundation\RedirectResponse
      */
-    public function deleteEntryAction(Request $request, Entry $entry)
+    public function deleteEntryAction(Entry $entry)
     {
         $this->checkUserAction($entry);
 
@@ -314,7 +313,7 @@ class EntryController extends Controller
             'Entry deleted'
         );
 
-        return $this->redirect($request->headers->get('referer'));
+        return $this->redirect($this->generateUrl('homepage'));
     }
 
     /**