Skip to content

Commit

Permalink
fixed edit action
Browse files Browse the repository at this point in the history
  • Loading branch information
Fafnur committed Mar 31, 2016
1 parent 0084106 commit af32064
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Controller/ContentBlockController.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ public function editAction($name, Request $request)
$em = $this->getDoctrine()->getManager();
$repository = $em->getRepository('GlavwebContentBlockBundle:ContentBlock');
$contentBlock = $repository->findOneByName($name);
$content = $request->request->get('content', '');
$content = json_decode($request->getContent());

if(!empty($contentBlock)) {
$contentBlock->setBody($content);
$contentBlock->setBody($content->body);
$em->flush();
$status = 200;
} else {
Expand Down

0 comments on commit af32064

Please sign in to comment.