10640-Report task. Resolve conflict

This commit is contained in:
Pablo Aragon 2023-07-24 10:06:43 +02:00
parent 8389169e16
commit 2a89a494cc
2 changed files with 6 additions and 3 deletions

View File

@ -116,6 +116,7 @@ if (!$report_r && !$report_w && !$report_m) {
} }
require_once $config['homedir'].'/include/functions_reports.php'; require_once $config['homedir'].'/include/functions_reports.php';
require_once $config['homedir'].'/godmode/wizards/DiscoveryTaskList.class.php';
// Load enterprise extensions. // Load enterprise extensions.
enterprise_include('operation/reporting/custom_reporting.php'); 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) { if (is_array($report_task_data) === true || strpos($report_task_data, 'class="nf"') === false) {
$task_table = '<div class="mrgn_top_15px white_box">'; $task_table = '<div class="mrgn_top_15px white_box">';
$task_table .= '<span class="white_table_graph_header">'.__('Report tasks'); $task_table .= '<span class="white_table_graph_header">'.__('Report tasks');

View File

@ -1109,9 +1109,9 @@ class DiscoveryTaskList extends HTML
* *
* @return boolean Success or not. * @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]);
} }