aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2015-08-22 11:40:45 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2015-08-22 12:09:27 +0200
commit16a3d04cbd98e2048c3510caf154c4456ee5b589 (patch)
tree91568a33a0bc0a58339f7eb62e7e4451a14ee544 /src/Wallabag
parentf9d5155abf1bc63fae91043a5e4c73ac3a4f0ba9 (diff)
downloadwallabag-16a3d04cbd98e2048c3510caf154c4456ee5b589.tar.gz
wallabag-16a3d04cbd98e2048c3510caf154c4456ee5b589.tar.zst
wallabag-16a3d04cbd98e2048c3510caf154c4456ee5b589.zip
Fix redirect after deletion
Fix #1391
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Controller/EntryController.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php
index b73e9eec..a77489e2 100644
--- a/src/Wallabag/CoreBundle/Controller/EntryController.php
+++ b/src/Wallabag/CoreBundle/Controller/EntryController.php
@@ -292,16 +292,15 @@ class EntryController extends Controller
292 } 292 }
293 293
294 /** 294 /**
295 * Deletes entry. 295 * Deletes entry and redirect to the homepage.
296 * 296 *
297 * @param Request $request 297 * @param Entry $entry
298 * @param Entry $entry
299 * 298 *
300 * @Route("/delete/{id}", requirements={"id" = "\d+"}, name="delete_entry") 299 * @Route("/delete/{id}", requirements={"id" = "\d+"}, name="delete_entry")
301 * 300 *
302 * @return \Symfony\Component\HttpFoundation\RedirectResponse 301 * @return \Symfony\Component\HttpFoundation\RedirectResponse
303 */ 302 */
304 public function deleteEntryAction(Request $request, Entry $entry) 303 public function deleteEntryAction(Entry $entry)
305 { 304 {
306 $this->checkUserAction($entry); 305 $this->checkUserAction($entry);
307 306
@@ -314,7 +313,7 @@ class EntryController extends Controller
314 'Entry deleted' 313 'Entry deleted'
315 ); 314 );
316 315
317 return $this->redirect($request->headers->get('referer')); 316 return $this->redirect($this->generateUrl('homepage'));
318 } 317 }
319 318
320 /** 319 /**