summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/comandos/gestores/gestor_Comandos.php
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2017-02-10 13:30:31 +0000
committerramon <ramongomez@us.es>2017-02-10 13:30:31 +0000
commit357352b27302b3fef93367cc617647def09b04a0 (patch)
tree84caa009870e9796f417f7ecba1f069271719728 /admin/WebConsole/comandos/gestores/gestor_Comandos.php
parentf784f182cdda7f91f9e4b35157fe6bf55ba4b5af (diff)
#708: Obtener datos y código HTTP en llamadas {{{curl_multi}}} de PHP; usar fecha en formato ISO 8601 y quitar líneas en blanco al final de ficheros.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5185 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole/comandos/gestores/gestor_Comandos.php')
-rw-r--r--admin/WebConsole/comandos/gestores/gestor_Comandos.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/admin/WebConsole/comandos/gestores/gestor_Comandos.php b/admin/WebConsole/comandos/gestores/gestor_Comandos.php
index 32bb6ae0..f81bea95 100644
--- a/admin/WebConsole/comandos/gestores/gestor_Comandos.php
+++ b/admin/WebConsole/comandos/gestores/gestor_Comandos.php
@@ -230,13 +230,11 @@ if($sw_ejya=='on' || $sw_ejprg=="on" ){
// Launch concurrent requests.
$responses = multiRequest($urls);
// Process responses array (IP as array index).
- foreach ($responses as $ip => $data) {
- if (isset($data)) {
- $status = json_decode($data);
- if (!isset($status->error)) {
- $ipsuccess .= "'".$ip."',";
- $numip++;
- }
+ foreach ($responses as $ip => $resp)) {
+ // Check if response code is OK (200).
+ if ($resp['code'] == 200)) {
+ $ipsuccess .= "'".$ip."',";
+ $numip++;
}
}
// quitamos último carácter ','