Commit 56503325e67b3fb9239fe7a7370c348b1c11c214

Authored by Bruno Menezes
1 parent 9148653e
Exists in master and in 1 other branch 3.1

Correção na edição de módulos

src/Cacic/CommonBundle/Entity/AcaoRedeRepository.php
... ... @@ -54,19 +54,18 @@ class AcaoRedeRepository extends EntityRepository
54 54  
55 55 $apagaObj = $em->getRepository( 'CacicCommonBundle:AcaoRede' )->findBy( array( 'acao'=>$acao ) );
56 56  
57   - foreach ( $apagaObj as $acao){
58   - if (!empty($acao))
59   - $em->remove($acao);
  57 + foreach ( $apagaObj as $acaoObj){
  58 + if (!empty($acaoObj))
  59 + $em->remove($acaoObj);
60 60 }
61 61  
62 62 $em->flush();
63 63  
64 64 foreach ( $novasRedes as $idRede )
65 65 {
66   - // $log = implode(",", $novasRedes);
67 66  
68 67 $new = new AcaoRede();
69   - $new->setAcao( $em->getRepository( 'CacicCommonBundle:Acao' )->find( $acao ) );
  68 + $new->setAcao( $em->getRepository( 'CacicCommonBundle:Acao' )->find( $acao ) );
70 69 $new->setRede( $em->getRepository( 'CacicCommonBundle:Rede' )->find( $idRede ) );
71 70 $em->persist( $new );
72 71  
... ...