diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 55a78f16da..601741a0c5 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -1558,11 +1558,11 @@ function config_update_config() if (Config::set( 'history_partitions_auto', - get_parameter_switch('history_partitions_auto'), + get_parameter_switch('history_partitions_auto', 0), true ) !== true ) { - $error_update[] = __('Historical database days compact'); + $error_update[] = __('Historical database partitions'); } if (Config::set( diff --git a/pandora_console/include/lib/Core/Config.php b/pandora_console/include/lib/Core/Config.php index 620c63f84a..8970d03835 100644 --- a/pandora_console/include/lib/Core/Config.php +++ b/pandora_console/include/lib/Core/Config.php @@ -73,18 +73,18 @@ final class Config false ); - if ($config['history_db_connection'] !== false) { - $data = \db_get_all_rows_sql( - 'SELECT * FROM `tconfig`', - false, - false, - $config['history_db_connection'] - ); - } - ob_get_clean(); } + if ($config['history_db_connection'] !== false) { + $data = \db_get_all_rows_sql( + 'SELECT * FROM `tconfig`', + false, + false, + $config['history_db_connection'] + ); + } + if (is_array($data) !== true) { return []; } diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 27db50c38b..d3d7387d7e 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -1134,6 +1134,9 @@ if (defined($history_dbh)) { 1 # Disable certain funcionality while runningn in historical database. ); + # Handle partitions. + enterprise_hook('handle_partitions', [$h_conf, $history_dbh]); + } # Release the lock