X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FController%2FEntryController.php;h=7fd982c903e82e66f0789125bedd62ffba616d5e;hb=4346a86068781f4acdeb574d7e2af08b77b58ea7;hp=81ab77887af8596150b98e07ea424374afabf894;hpb=7781faa0b0749b0d9842fddec3e337db04d44a10;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 81ab7788..7fd982c9 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php @@ -50,7 +50,7 @@ class EntryController extends Controller } /** - * Shows unread entries for current user + * Shows unread entries for current user. * * @Route("/unread", name="unread") * @@ -70,7 +70,7 @@ class EntryController extends Controller } /** - * Shows read entries for current user + * Shows read entries for current user. * * @Route("/archive", name="archive") * @@ -90,7 +90,7 @@ class EntryController extends Controller } /** - * Shows starred entries for current user + * Shows starred entries for current user. * * @Route("/starred", name="starred") * @@ -110,7 +110,7 @@ class EntryController extends Controller } /** - * Shows entry content + * Shows entry content. * * @param Entry $entry * @@ -129,7 +129,7 @@ class EntryController extends Controller } /** - * Changes read status for an entry + * Changes read status for an entry. * * @param Request $request * @param Entry $entry @@ -154,7 +154,7 @@ class EntryController extends Controller } /** - * Changes favorite status for an entry + * Changes favorite status for an entry. * * @param Request $request * @param Entry $entry @@ -179,7 +179,7 @@ class EntryController extends Controller } /** - * Deletes entry + * Deletes entry. * * @param Request $request * @param Entry $entry @@ -192,8 +192,9 @@ class EntryController extends Controller { $this->checkUserAction($entry); - $entry->setDeleted(1); - $this->getDoctrine()->getManager()->flush(); + $em = $this->getDoctrine()->getManager(); + $em->remove($entry); + $em->flush(); $this->get('session')->getFlashBag()->add( 'notice', @@ -204,7 +205,7 @@ class EntryController extends Controller } /** - * Check if the logged user can manage the given entry + * Check if the logged user can manage the given entry. * * @param Entry $entry */