Commit c7607d425ec08c42fcd6dd5800fbf7c36bcde571
1 parent
3546358b
Exists in
master
and in
1 other branch
alterando aquisição de ip por classe wmi
Showing
1 changed file
with
5 additions
and
2 deletions
Show diff stats
src/Cacic/WSBundle/Controller/DefaultController.php
| ... | ... | @@ -37,9 +37,12 @@ class DefaultController extends Controller |
| 37 | 37 | { |
| 38 | 38 | $data = new \DateTime('NOW'); |
| 39 | 39 | |
| 40 | - $insucesso = new InsucessoInstalacao(); | |
| 40 | + $strNetworkAdapterConfiguration = OldCacicHelper::deCrypt( $request, $request->get('NetworkAdapterConfiguration') ); | |
| 41 | + $ip_computador = $request->get('te_ip_computador'); | |
| 42 | + $ip_computador = !empty( $ip_computador ) ?: TagValueHelper::getValueFromTags( 'IPAddress', $strNetworkAdapterConfiguration ); | |
| 41 | 43 | |
| 42 | - $insucesso->setTeIpComputador( $_SERVER["REMOTE_ADDR"] ); | |
| 44 | + $insucesso = new InsucessoInstalacao(); | |
| 45 | + $insucesso->setTeIpComputador( $ip_computador ); | |
| 43 | 46 | $insucesso->setTeSo( $request->get('te_so') ); |
| 44 | 47 | $insucesso->setIdUsuario( $request->get('id_usuario') ); |
| 45 | 48 | $insucesso->setCsIndicador( $request->get('cs_indicador') ); | ... | ... |