Merge branch 'ent-3835-pandora-db-historical-fails-when-port-setted' into develop

This commit is contained in:
Ramon Novoa 2019-05-07 15:05:03 +02:00
commit a92f81272a
1 changed files with 15 additions and 15 deletions

View File

@ -200,8 +200,8 @@ if ($config['history_db_enabled'] == 1) {
);
$time_pandora_db_history = false;
if ($history_connect !== false) {
if ($config['history_db_connection'] !== false) {
if ($history_connect) {
if ($config['history_db_connection']) {
$time_pandora_db_history = mysql_db_process_sql(
$sql,
'insert_id',
@ -405,6 +405,8 @@ if ($config['history_db_enabled'] == 1) {
);
}
$config_history = false;
if ($config['history_db_connection']) {
$history_connect = @mysql_db_process_sql(
'SELECT 1 FROM tconfig',
'affected_rows',
@ -412,9 +414,7 @@ if ($config['history_db_enabled'] == 1) {
false
);
$config_history = false;
if ($history_connect !== false) {
if ($config['history_db_connection'] != false) {
$config_history_array = mysql_db_process_sql(
'SELECT * FROM tconfig',
'affected_rows',
@ -427,12 +427,12 @@ if ($config['history_db_enabled'] == 1) {
$config_history[$value['token']] = $value['value'];
}
}
}
} else {
echo ui_print_error_message(
__('The tconfig table does not exist in the historical database')
);
}
}
if ($config_history === false) {
$config_history = [];