X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FController%2FEntryController.php;h=8a8f3cd79ed76cecc5ad9dbdf6a69e6ac2158010;hb=2691cf04384239c546e141af6cc3c22b210dae58;hp=89677befb6c347a003429513392254ee2fe1e00c;hpb=fa8d56393413fc599a972699ad4780e92f1a2010;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 89677bef..8a8f3cd7 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php @@ -7,7 +7,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; use Wallabag\CoreBundle\Entity\Entry; use Wallabag\CoreBundle\Service\Extractor; -use Wallabag\CoreBundle\Helper\Url; +use Wallabag\CoreBundle\Form\Type\EntryType; class EntryController extends Controller { @@ -22,10 +22,7 @@ class EntryController extends Controller { $entry = new Entry($this->getUser()); - $form = $this->createFormBuilder($entry) - ->add('url', 'url') - ->add('save', 'submit') - ->getForm(); + $form = $this->createForm(new EntryType(), $entry); $form->handleRequest($request); @@ -195,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',