%d AND utimestamp < %d %s GROUP BY %s ORDER BY sum_bytes DESC LIMIT %d', $field_to_group, $start, $end, $filter_sql, $field_to_group, $top ); $data = db_get_all_rows_sql($sql); return ($data !== false) ? $data : []; } /** * Get the possible actions on networking. * * @param boolean $network True if network. False if netflow. * * @return array With the actions to print in a select. */ function network_get_report_actions($network) { $common_actions = [ 'listeners' => __('Top listeners'), 'talkers' => __('Top talkers'), ]; if ($network) { return $common_actions; } return array_merge( $common_actions, [ 'tcp' => __('Top TCP protocols'), 'udp' => __('Top UDP protocols'), ] ); }