mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
MADE only on compatible module types
This commit is contained in:
parent
35db83647a
commit
6612fe96bd
@ -1337,7 +1337,7 @@ if ($update_module === true || $create_module === true) {
|
||||
*/
|
||||
|
||||
$post_process = (string) get_parameter('post_process', 0.0);
|
||||
if (modules_is_string_type($id_module_type) === false) {
|
||||
if (modules_made_compatible($id_module_type) === false) {
|
||||
$made_enabled = (bool) get_parameter_checkbox('made_enabled', 0);
|
||||
} else {
|
||||
$made_enabled = false;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2654,7 +2654,7 @@ function process_manage_edit($module_name, $agents_select=null, $module_status='
|
||||
$values['macros'] = json_encode($module_macros);
|
||||
}
|
||||
|
||||
if (modules_is_string_type($module['id_tipo_modulo']) === true) {
|
||||
if (modules_made_compatible($module['id_tipo_modulo']) === false) {
|
||||
$values['made_enabled'] = 0;
|
||||
}
|
||||
|
||||
|
@ -4762,3 +4762,30 @@ function export_agents_module_csv($filters)
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if modules are compatible with MADE server.
|
||||
*
|
||||
* @param integer $id_tipo_modulo
|
||||
* @retur boolean True if compatible, false otherwise.
|
||||
*/
|
||||
function modules_made_compatible($id_tipo_modulo)
|
||||
{
|
||||
$compatible_types = [
|
||||
1,
|
||||
4,
|
||||
5,
|
||||
15,
|
||||
16,
|
||||
22,
|
||||
30,
|
||||
34,
|
||||
];
|
||||
|
||||
if (array_search($id_tipo_modulo, $compatible_types) === false) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user