mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Minor improvements
This commit is contained in:
parent
e2281d6bc8
commit
04c8348042
@ -15,10 +15,14 @@
|
|||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
require_once ('include/functions_agents.php');
|
|
||||||
include_once ('include/functions_reporting.php');
|
require_once ($config['homedir'] . '/include/functions_agents.php');
|
||||||
|
include_once ($config['homedir'] . '/include/functions_reporting.php');
|
||||||
enterprise_include_once ('include/functions_metaconsole.php');
|
enterprise_include_once ('include/functions_metaconsole.php');
|
||||||
|
|
||||||
|
// Clean the possible blanks introduced by the included files
|
||||||
|
ob_clean();
|
||||||
|
|
||||||
// Get list of agent + ip
|
// Get list of agent + ip
|
||||||
// Params:
|
// Params:
|
||||||
// * search_agents 1
|
// * search_agents 1
|
||||||
@ -30,9 +34,10 @@ $get_agents_group = (bool) get_parameter('get_agents_group', false);
|
|||||||
$force_local = (bool) get_parameter('force_local', false);
|
$force_local = (bool) get_parameter('force_local', false);
|
||||||
|
|
||||||
if ($get_agents_group) {
|
if ($get_agents_group) {
|
||||||
$id_group = (int)get_parameter('id_group', -1);
|
|
||||||
$mode = (string)get_parameter('mode', 'json');
|
$id_group = (int) get_parameter('id_group', -1);
|
||||||
$id_server = (int)get_parameter('id_server', 0);
|
$mode = (string) get_parameter('mode', 'json');
|
||||||
|
$id_server = (int) get_parameter('id_server', 0);
|
||||||
|
|
||||||
$return = array();
|
$return = array();
|
||||||
if ($id_group != -1) {
|
if ($id_group != -1) {
|
||||||
@ -54,10 +59,9 @@ if ($get_agents_group) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($search_agents && ((!defined('METACONSOLE')) || $force_local)) {
|
if ($search_agents && ((!defined('METACONSOLE')) || $force_local)) {
|
||||||
require_once ('include/functions_agents.php');
|
|
||||||
|
|
||||||
$id_agent = (int) get_parameter ('id_agent');
|
$id_agent = (int) get_parameter('id_agent');
|
||||||
$string = (string) get_parameter ('q'); /* q is what autocomplete plugin gives */
|
$string = (string) get_parameter('q'); /* q is what autocomplete plugin gives */
|
||||||
$id_group = (int) get_parameter('id_group', -1);
|
$id_group = (int) get_parameter('id_group', -1);
|
||||||
$addedItems = html_entity_decode((string) get_parameter('add'));
|
$addedItems = html_entity_decode((string) get_parameter('add'));
|
||||||
$addedItems = json_decode($addedItems);
|
$addedItems = json_decode($addedItems);
|
||||||
@ -159,7 +163,6 @@ if ($search_agents && ((!defined('METACONSOLE')) || $force_local)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo json_encode($data);
|
echo json_encode($data);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
elseif ($search_agents && ($config['metaconsole'] == 1) && defined('METACONSOLE')) {
|
elseif ($search_agents && ($config['metaconsole'] == 1) && defined('METACONSOLE')) {
|
||||||
@ -288,4 +291,7 @@ elseif ($search_agents && ($config['metaconsole'] == 1) && defined('METACONSOLE'
|
|||||||
echo json_encode($data);
|
echo json_encode($data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user