Commit d1c2dc1b368e3104df884f059ab629b8f65d15a5
1 parent
77d40a3b
Exists in
master
and in
1 other branch
modulo mapaController
Showing
1 changed file
with
7 additions
and
5 deletions
Show diff stats
src/Cacic/WSBundle/Controller/MapaController.php
... | ... | @@ -41,6 +41,7 @@ class MapaController extends Controller { |
41 | 41 | $netmask = $request->get('netmask'); |
42 | 42 | } |
43 | 43 | |
44 | + $modPatrimonio = "false"; | |
44 | 45 | $so = $this->getDoctrine()->getRepository('CacicCommonBundle:So')->findOneBy( array('teSo'=>$request->get( 'te_so' ))); |
45 | 46 | $rede = $this->getDoctrine()->getRepository('CacicCommonBundle:Rede')->getDadosRedePreColeta( $ip_computador, $netmask ); |
46 | 47 | $computador = $this->getDoctrine()->getRepository('CacicCommonBundle:Computador')->getComputadorPreCole( $request, $request->get( 'te_so' ),$te_node_address, $rede, $so, $ip_computador ); |
... | ... | @@ -64,12 +65,13 @@ class MapaController extends Controller { |
64 | 65 | )->setParameter('id', $computador); |
65 | 66 | |
66 | 67 | $result = $query->getResult(); |
67 | - } | |
68 | 68 | |
69 | - if (empty($result)) | |
70 | - $modPatrimonio = "true"; | |
71 | - else | |
72 | - $modPatrimonio = "false"; | |
69 | + /** | |
70 | + * Caso não exista nenhuma coleta, envia "true" para o agente. | |
71 | + */ | |
72 | + if (empty($result)) | |
73 | + $modPatrimonio = "true"; | |
74 | + } | |
73 | 75 | |
74 | 76 | /** |
75 | 77 | * Mensagem a ser exibida na tela de Pop-Up do patrimônio | ... | ... |