From 58a6e1a416302d81f1a5cb4fb4464a84673ca649 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Wed, 18 Nov 2015 15:23:50 +0100 Subject: [PATCH] Add new token to limit events to replicate in metaconsole. Tiquet: #2979 (cherry picked from commit f774a52d904365f4fa02038fae6de49f566c936a) --- pandora_console/include/functions_config.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 379b869eda..bbf43301dd 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -217,6 +217,8 @@ function config_update_config () { if ((int)get_parameter('event_replication') == 1) { if (!config_update_value ('replication_interval', (int)get_parameter('replication_interval'))) $error_update[] = __('Replication interval'); + if (!config_update_value ('replication_limit', (int)get_parameter('replication_limit'))) + $error_update[] = __('Replication limit'); if (!config_update_value ('replication_mode', (string)get_parameter('replication_mode'))) $error_update[] = __('Replication mode'); if (!config_update_value ('show_events_in_local', (string)get_parameter('show_events_in_local'))) @@ -815,6 +817,10 @@ function config_process_config () { config_update_value ('replication_interval', 120); } + if (!isset ($config["replication_limit"])) { + config_update_value ('replication_limit', 1000); + } + if (!isset ($config["replication_dbengine"])) { config_update_value ('replication_dbengine', 'mysql'); }