diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index dece17dabb..41330451c8 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -499,7 +499,7 @@ if ($agents !== false) { /* Begin Update tagente.remote 0/1 with remote agent function return */ - if(enterprise_hook('config_agents_has_remote_configuration',$agent['id_agente'])){ + if(enterprise_hook('config_agents_has_remote_configuration',array($agent['id_agente']))){ db_process_sql_update('tagente', array('remote' => 1),'id_agente = '.$agent['id_agente'].''); } else{ @@ -584,7 +584,7 @@ if ($agents !== false) { // Has remote configuration ? if (enterprise_installed()) { enterprise_include_once('include/functions_config_agents.php'); - if (enterprise_hook('config_agents_has_remote_configuration',$agent["id_agente"])) { + if (enterprise_hook('config_agents_has_remote_configuration',array($agent["id_agente"]))) { echo "data[10][1] = html_print_textarea ('unknown_instructions', 2, 6 $table_advanced->colspan[10][1] = 6; if (isset($id_agente) && $moduletype == MODULE_DATA) { - $table_advanced->data[11][0] = __('Cron') . - ui_print_help_tip (__('If cron is set the module interval is ignored and the module runs on the specified date and time'), true); - $table_advanced->data[11][1] = html_print_extended_select_for_cron ($hour, $minute, $mday, $month, $wday, true, true); - $table_advanced->colspan[11][1] = 6; + $has_remote_conf = enterprise_hook('config_agents_has_remote_configuration',array($agent["id_agente"])); + if ($has_remote_conf) { + $table_advanced->data[11][0] = __('Cron') . + ui_print_help_tip (__('If cron is set the module interval is ignored and the module runs on the specified date and time'), true); + $table_advanced->data[11][1] = html_print_extended_select_for_cron ($hour, $minute, $mday, $month, $wday, true, $disabledBecauseInPolicy); + $table_advanced->colspan[11][1] = 6; } + else { + $table_advanced->data[11][0] = __('Cron') . + ui_print_help_tip (__('If cron is set the module interval is ignored and the module runs on the specified date and time'), true); + $table_advanced->data[11][1] = html_print_extended_select_for_cron ($hour, $minute, $mday, $month, $wday, true, true); + $table_advanced->colspan[11][1] = 6; + } +} else { $table_advanced->data[11][0] = __('Cron') . ui_print_help_tip (__('If cron is set the module interval is ignored and the module runs on the specified date and time'), true); diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index 613a8b7ce7..4da1f3cead 100755 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -231,7 +231,7 @@ function modules_copy_agent_module_to_agent ($id_agent_module, $id_destiny_agent if ($module['id_modulo'] == MODULE_DATA) { if (enterprise_installed()) { - if (enterprise_hook('config_agents_has_remote_configuration',$id_agente)) { + if (enterprise_hook('config_agents_has_remote_configuration',array($id_agente))) { $result = enterprise_hook( 'config_agents_copy_agent_module_to_agent', array($id_agent_module, $id_new_module)); diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index 34ba2e8572..d57f56cde3 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -586,7 +586,7 @@ foreach ($agents as $agent) { if (enterprise_installed()) { enterprise_include_once('include/functions_config_agents.php'); - if (enterprise_hook('config_agents_has_remote_configuration',$agent["id_agente"])) { + if (enterprise_hook('config_agents_has_remote_configuration',array($agent["id_agente"]))) { $data[9] = html_print_image("images/application_edit.png", true, array("align" => 'middle', "title" => __('Remote config')));