mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Fixed problems with wizard visual console. Tiquet: #2756
This commit is contained in:
parent
151503f25a
commit
9bf9101de5
@ -404,9 +404,15 @@ switch ($activeTab) {
|
|||||||
|
|
||||||
|
|
||||||
if (defined("METACONSOLE")) {
|
if (defined("METACONSOLE")) {
|
||||||
|
$agents_ids = array();
|
||||||
|
foreach ($id_agents as $id_agent_id) {
|
||||||
|
$server_and_agent = explode("|",$id_agent_id);
|
||||||
|
|
||||||
|
$agents_ids[] = $server_and_agent[1];
|
||||||
|
}
|
||||||
$rows = db_get_all_rows_filter(
|
$rows = db_get_all_rows_filter(
|
||||||
'tmetaconsole_agent',
|
'tmetaconsole_agent',
|
||||||
array('id_tagente' => $id_agents));
|
array('id_tagente' => $agents_ids));
|
||||||
|
|
||||||
$agents = array();
|
$agents = array();
|
||||||
foreach ($rows as $row) {
|
foreach ($rows as $row) {
|
||||||
@ -475,36 +481,36 @@ switch ($activeTab) {
|
|||||||
$id_modules = array();
|
$id_modules = array();
|
||||||
|
|
||||||
if ($id_server != 0) {
|
if ($id_server != 0) {
|
||||||
if (metaconsole_connect(null, $id_server) != NOERR) {
|
foreach ($name_modules as $serial_data) {
|
||||||
continue;
|
$modules_serial = explode(';', $serial_data);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($name_modules as $mod) {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach ($id_agents as $ag) {
|
|
||||||
|
|
||||||
$id_module = agents_get_modules($ag,
|
foreach ($modules_serial as $data_serialized) {
|
||||||
array('id_agente_modulo'),
|
$data = explode('|', $data_serialized);
|
||||||
array('nombre' => $mod));
|
$id_modules[] = $data[0];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (empty($id_module))
|
|
||||||
continue;
|
|
||||||
else {
|
|
||||||
$id_module = reset($id_module);
|
|
||||||
$id_module = $id_module['id_agente_modulo'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$id_modules[] = $id_module;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
if ($id_server != 0) {
|
foreach ($name_modules as $mod) {
|
||||||
metaconsole_restore_db();
|
|
||||||
|
foreach ($id_agents as $ag) {
|
||||||
|
|
||||||
|
$id_module = agents_get_modules($ag,
|
||||||
|
array('id_agente_modulo'),
|
||||||
|
array('nombre' => $mod));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (empty($id_module))
|
||||||
|
continue;
|
||||||
|
else {
|
||||||
|
$id_module = reset($id_module);
|
||||||
|
$id_module = $id_module['id_agente_modulo'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$id_modules[] = $id_module;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$message .= visual_map_process_wizard_add_modules(
|
$message .= visual_map_process_wizard_add_modules(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user