mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Fixes
This commit is contained in:
parent
1b3ce33690
commit
de58fe7b90
@ -1360,11 +1360,7 @@ function safe_sql_string($string) {
|
|||||||
|
|
||||||
function is_metaconsole() {
|
function is_metaconsole() {
|
||||||
global $config;
|
global $config;
|
||||||
|
return (bool) $config['metaconsole'];
|
||||||
if ($config['metaconsole'])
|
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -799,8 +799,17 @@ function agents_common_modules ($id_agent, $filter = false, $indexed = true, $ge
|
|||||||
*
|
*
|
||||||
* @return array An array with all agents in the group or an empty array
|
* @return array An array with all agents in the group or an empty array
|
||||||
*/
|
*/
|
||||||
function agents_get_group_agents ($id_group = 0, $search = false,
|
function agents_get_group_agents (
|
||||||
$case = "lower", $noACL = false, $childGroups = false, $serialized = false, $separator = '|', $add_alert_bulk_op = false) {
|
$id_group = 0,
|
||||||
|
$search = false,
|
||||||
|
$case = "lower",
|
||||||
|
$noACL = false,
|
||||||
|
$childGroups = false,
|
||||||
|
$serialized = false,
|
||||||
|
$separator = '|',
|
||||||
|
$add_alert_bulk_op = false,
|
||||||
|
$meta_use_main_id = false
|
||||||
|
) {
|
||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -951,7 +960,7 @@ function agents_get_group_agents ($id_group = 0, $search = false,
|
|||||||
$table_name = 'tmetaconsole_agent';
|
$table_name = 'tmetaconsole_agent';
|
||||||
|
|
||||||
$fields = array(
|
$fields = array(
|
||||||
'id_tagente AS id_agente',
|
$meta_use_main_id ? 'id_agente' : 'id_tagente AS id_agente',
|
||||||
'alias',
|
'alias',
|
||||||
'id_tmetaconsole_setup AS id_server'
|
'id_tmetaconsole_setup AS id_server'
|
||||||
);
|
);
|
||||||
@ -2010,7 +2019,8 @@ function agents_get_agentmodule_group ($id_module) {
|
|||||||
* @return int The group id
|
* @return int The group id
|
||||||
*/
|
*/
|
||||||
function agents_get_agent_group ($id_agent) {
|
function agents_get_agent_group ($id_agent) {
|
||||||
return (int) db_get_value ('id_grupo', 'tagente', 'id_agente', (int) $id_agent);
|
$table = is_metaconsole() ? "tmetaconsole_agent" : "tagente";
|
||||||
|
return (int) db_get_value ('id_grupo', $table, 'id_agente', (int) $id_agent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user