aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-08-24 10:44:14 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-08-24 10:44:14 +0200
commit7083d183b9df11f350be0d7039f5f0e33536b94b (patch)
tree580d906fb1eea6099d2469d28d38050b05418cb3 /src
parent8bb1f3d69ac9a1d0adbbfa0cc689043ae1610fd1 (diff)
parent16a3d04cbd98e2048c3510caf154c4456ee5b589 (diff)
downloadwallabag-7083d183b9df11f350be0d7039f5f0e33536b94b.tar.gz
wallabag-7083d183b9df11f350be0d7039f5f0e33536b94b.tar.zst
wallabag-7083d183b9df11f350be0d7039f5f0e33536b94b.zip
Merge pull request #1392 from wallabag/v2-fix-redirect
Fix redirect after deletion
Diffstat (limited to 'src')
-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 /**