$entry) { if (!isset($GLOBALS['valid']['wifi']['aps'][$ap_index])) { $wifi_ap_id = $entry['wifi_ap_id']; if ($entry['deleted'] || safe_empty($ap_index)) { echo("AP will delete AP:$ap_index with id:$wifi_ap_id"); dbDelete('wifi_aps', '`wifi_ap_id` = ?', [$wifi_ap_id]); dbDelete('wifi_aps_members', '`wifi_ap_id` = ?', [$wifi_ap_id]); } else { //echo("AP don't exists in WLC anymore, but it's not marked to be deleted (considering Down): $ap_index with id:$wifi_ap_id\n"); dbUpdate(['deleted' => 1], 'wifi_aps', '`device_id` = ? AND `wifi_ap_id` = ?', [$device['device_id'], $wifi_ap_id]); } } } } // FIXME - Actually write this code :) // FIXME - No for real write this code. :D unset($GLOBALS['cache']['wifi_radios'], $GLOBALS['cache']['wifi_wlans'], $GLOBALS['cache']['wifi_aps'], $ap, $wlan, $radio); echo(PHP_EOL); //EOF