diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 10266290c7..00bc80f234 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -116,6 +116,7 @@ if (!$report_r && !$report_w && !$report_m) { } require_once $config['homedir'].'/include/functions_reports.php'; +require_once $config['homedir'].'/godmode/wizards/DiscoveryTaskList.class.php'; // Load enterprise extensions. enterprise_include('operation/reporting/custom_reporting.php'); @@ -1277,7 +1278,9 @@ switch ($action) { ); } - $report_task_data = enterprise_hook('tasklist_showListConsoleTask', [$object, true]); + $discovery_tasklist = new DiscoveryTaskList(); + $report_task_data = $discovery_tasklist->showListConsoleTask(true); + if (is_array($report_task_data) === true || strpos($report_task_data, 'class="nf"') === false) { $task_table = '
'; $task_table .= ''.__('Report tasks'); diff --git a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php index 9f2eb408b3..0fefe0739e 100644 --- a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php +++ b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php @@ -1109,9 +1109,9 @@ class DiscoveryTaskList extends HTML * * @return boolean Success or not. */ - public function showListConsoleTask() + public function showListConsoleTask($report_task=false) { - return enterprise_hook('tasklist_showListConsoleTask', [$this]); + return enterprise_hook('tasklist_showListConsoleTask', [$this, $report_task]); }