Remove variable $ipaddr

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2019-06-15 08:45:20 +02:00
parent f0458e518a
commit cbd8eb6148
+2 -4
View File
@@ -73,12 +73,10 @@ if(isset($_GET["network"]) && $auth)
while($results !== false && $res = $results->fetchArray(SQLITE3_ASSOC))
{
$id = $res["id"];
$ipaddr = array();
$res["ip"] = array();
$ips = $db->query("SELECT ip FROM network_addresses WHERE network_id = $id ORDER BY lastSeen DESC");
while($ips !== false && $ip = $ips->fetchArray(SQLITE3_ASSOC))
array_push($ipaddr,$ip["ip"]);
if(count($ipaddr) > 0)
$res["ip"] = $ipaddr;
array_push($res["ip"],$ip["ip"]);
array_push($network, $res);
}