mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-27 11:31:05 +00:00
parent
f9d5155abf
commit
16a3d04cbd
1 changed files with 4 additions and 5 deletions
|
@ -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")
|
* @Route("/delete/{id}", requirements={"id" = "\d+"}, name="delete_entry")
|
||||||
*
|
*
|
||||||
* @return \Symfony\Component\HttpFoundation\RedirectResponse
|
* @return \Symfony\Component\HttpFoundation\RedirectResponse
|
||||||
*/
|
*/
|
||||||
public function deleteEntryAction(Request $request, Entry $entry)
|
public function deleteEntryAction(Entry $entry)
|
||||||
{
|
{
|
||||||
$this->checkUserAction($entry);
|
$this->checkUserAction($entry);
|
||||||
|
|
||||||
|
@ -314,7 +313,7 @@ class EntryController extends Controller
|
||||||
'Entry deleted'
|
'Entry deleted'
|
||||||
);
|
);
|
||||||
|
|
||||||
return $this->redirect($request->headers->get('referer'));
|
return $this->redirect($this->generateUrl('homepage'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue