Skip to content

Commit

Permalink
Refine 2b39953.
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-unwin committed Jan 31, 2024
1 parent dfe5c40 commit a5ee991
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/Helpers/response_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,8 @@ function response_create($instance = null)
$permission_requested = $response->meta->permission_requested;
if (!empty($config->enterprise_binary) and $db->tableExists('enterprise')) {
$function = $response->meta->collection . '_' . $response->meta->action;
if (!in_array($function, array("baselines_create", "baselines_execute", "clusters_create", "collectors_create", "collectors_register", "dashboards_create", "discovery_scan_options_create", "discovery_scan_options_update", "racks_create", "roles_create", "tasks_create", "widgets_create", "widgets_update")) and ($function !== 'configuration_update' and $response->meta->id !== $config->license_string_id and $response->meta->id !== $config->license_string_collector_id)) {
if (!in_array($function, array("baselines_create", "baselines_execute", "clusters_create", "collectors_create", "collectors_register", "dashboards_create", "discovery_scan_options_create", "discovery_scan_options_update", "racks_create", "roles_create", "tasks_create", "widgets_create", "widgets_update")) and
!($function !== 'configuration_update' and ($response->meta->id !== $config->license_string_id or $response->meta->id !== $config->license_string_collector_id))) {
$received_data = $response->meta->received_data;
$response->meta->received_data = array();
}
Expand Down Expand Up @@ -501,7 +502,8 @@ function response_create($instance = null)
$sql = "DELETE FROM enterprise WHERE DATE(timestamp) < SUBDATE(CURDATE(), 0)";
$db->query($sql);
}
if (!in_array($function, array("baselines_create", "baselines_execute", "clusters_create", "collectors_create", "collectors_register", "dashboards_create", "discovery_scan_options_create", "discovery_scan_options_update", "racks_create", "roles_create", "tasks_create", "widgets_create", "widgets_update")) and ($function !== 'configuration_update' and $response->meta->id !== $config->license_string_id and $response->meta->id !== $config->license_string_collector_id)) {
if (!in_array($function, array("baselines_create", "baselines_execute", "clusters_create", "collectors_create", "collectors_register", "dashboards_create", "discovery_scan_options_create", "discovery_scan_options_update", "racks_create", "roles_create", "tasks_create", "widgets_create", "widgets_update")) and
!($function !== 'configuration_update' and ($response->meta->id !== $config->license_string_id or $response->meta->id !== $config->license_string_collector_id))) {
$response->meta->received_data = $received_data;
}
// TODO - Why does enterprise return this as a string?
Expand Down

0 comments on commit a5ee991

Please sign in to comment.