mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Fixed API function set_module_data
This commit is contained in:
parent
3094d5af05
commit
32da1d287b
@ -9080,7 +9080,9 @@ function api_set_delete_module($id, $id2, $other, $trash1)
|
|||||||
|
|
||||||
function api_set_module_data($id, $thrash2, $other, $trash1)
|
function api_set_module_data($id, $thrash2, $other, $trash1)
|
||||||
{
|
{
|
||||||
if (defined('METACONSOLE')) {
|
global $config;
|
||||||
|
|
||||||
|
if (is_metaconsole()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -9129,8 +9131,9 @@ function api_set_module_data($id, $thrash2, $other, $trash1)
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (false === @file_put_contents($config['remote_config'].'/'.io_safe_output($agent['nombre']).'.'.$time.'.data', $xml)) {
|
if (false === @file_put_contents($config['remote_config'].'/'.io_safe_output($agent['nombre']).'.'.$time.'.data', $xml)) {
|
||||||
returnError('error_file', 'Can save agent data xml.');
|
returnError('error_file', 'XML file could not be generated in path: '.$config['remote_config']);
|
||||||
} else {
|
} else {
|
||||||
|
echo __('XML file was generated successfully in path: ').$config['remote_config'];
|
||||||
returnData('string', ['type' => 'string', 'data' => $xml]);
|
returnData('string', ['type' => 'string', 'data' => $xml]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user