Skip to content

Commit

Permalink
Populate ip_padded in discovery log for discoveriesRead template.
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-unwin committed Mar 19, 2024
1 parent bcb1414 commit 5101cad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/Models/DiscoveriesModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,11 @@ public function includedRead(int $id = 0): array

$sql = "SELECT * FROM discovery_log WHERE discovery_id = ? ORDER BY id";
$query = $this->db->query($sql, [$id]);
$included['discovery_log'] = $query->getResult();
$discovery_log = $query->getResult();
foreach ($discovery_log as $log) {
$log->ip_padded = ip_address_to_db($log->ip);
}
$included['discovery_log'] = $discovery_log;

$discovery_scan_optionsModel = new \App\Models\DiscoveryScanOptionsModel();
$included['discovery_scan_options'] = $discovery_scan_optionsModel->listUser();
Expand Down

0 comments on commit 5101cad

Please sign in to comment.