diff --git a/pandora_console/include/ajax/tree.ajax.php b/pandora_console/include/ajax/tree.ajax.php index 766fc657ab..910e0bf87c 100644 --- a/pandora_console/include/ajax/tree.ajax.php +++ b/pandora_console/include/ajax/tree.ajax.php @@ -21,6 +21,7 @@ if (is_ajax ()) { check_login (); require_once($config['homedir'] . "/include/class/Tree.class.php"); + enterprise_include_once("include/class/Tree.class.php"); require_once($config['homedir'] . "/include/functions_reporting.php"); require_once($config['homedir'] . "/include/functions_os.php"); @@ -38,12 +39,23 @@ if (is_ajax ()) { $countModuleStatusMethod = get_parameter('countModuleStatusMethod', 'on_demand'); $countAgentStatusMethod = get_parameter('countAgentStatusMethod', 'live'); - $tree = new Tree($type, - $id, - $childrenMethod, - $countModuleStatusMethod, - $countAgentStatusMethod - ); + if (class_exists('TreeEnterprise')) { + $tree = new TreeEnterprise($type, + $id, + $childrenMethod, + $countModuleStatusMethod, + $countAgentStatusMethod + ); + } + else { + $tree = new Tree($type, + $id, + $childrenMethod, + $countModuleStatusMethod, + $countAgentStatusMethod + ); + } + $tree->setFilter(array( 'status' => $filter['status'], 'search' => $filter['search']));