Skip to content

Commit

Permalink
Do not display executables on SummaryCollection template if not enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-unwin committed Apr 23, 2024
1 parent e6f1cde commit 26c228e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/Helpers/utility_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ function collections_list()

$collections->discovery_scan_options = new \StdClass();
$collections->discovery_scan_options->icon = 'fa fa-random';
$collections->discovery_scan_options->name = 'Scan Options';
$collections->discovery_scan_options->name = 'Discovery Scan Options';
$collections->discovery_scan_options->edition = 'Enterprise';
$collections->discovery_scan_options->orgs = 'b';
$collections->discovery_scan_options->actions = new \stdClass();
Expand Down
3 changes: 3 additions & 0 deletions app/Models/SummariesModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ public function includedCollection(): array
$collection->count = $count;
}
}
if (empty($instance->config->feature_executables) or $instance->config->feature_executables !== 'y') {
unset($collections->executables);
}
$collections->maps->count = 1;
$collections->reports->count = 12;
$sql = "SELECT COUNT(*) AS `count` FROM `orgs` WHERE `id` IN (" . implode(',', $orgs) . ")";
Expand Down

0 comments on commit 26c228e

Please sign in to comment.