Merge branch 'fix/ux-panel-historical-images' into 'develop'

Fix/ux panel historical images

See merge request artica/pandorafms!1984
This commit is contained in:
vgilc 2018-11-16 12:51:31 +01:00
commit f99dadca39
3 changed files with 6 additions and 6 deletions

View File

@ -1032,11 +1032,11 @@ function config_process_config () {
}
if (!isset ($config["replication_interval"])) {
config_update_value ('replication_interval', 120);
config_update_value ('replication_interval', 1);
}
if (!isset ($config["replication_limit"])) {
config_update_value ('replication_limit', 1000);
config_update_value ('replication_limit', 50);
}
if (!isset ($config["replication_dbengine"])) {

View File

@ -60,7 +60,7 @@ if($utimestamp == '') {
} else {
// Retrieve target data
$state = db_get_row('tagente_estado', 'id_agente_modulo', $id, array('id_agente'));
$row_state = db_get_row_filter('tagente_datos_string', array('id_agente_modulo' => $id, 'utimestamp' => $utimestamp));
$row_state = db_get_row_filter('tagente_datos_string', array('id_agente_modulo' => $id, 'utimestamp' => $utimestamp), false, 'AND', 1);
$row_state['id_agente'] = $state['id_agente'];
$last_timestamp = date("Y-m-d H:i:s", $row_state['utimestamp']);
}

View File

@ -867,7 +867,7 @@ sub db_insert ($$$;@) {
};
if ($@) {
my $exception = @_;
if ($DBI::err == 1213) {
if ($DBI::err == 1213 || $DBI::err == 1205) {
$dbh->do($query, undef, @values);
$insert_id = $dbh->{'mysql_insertid'};
}
@ -891,7 +891,7 @@ sub db_update ($$;@) {
};
if ($@) {
my $exception = @_;
if ($DBI::err == 1213) {
if ($DBI::err == 1213 || $DBI::err == 1205) {
$rows = $dbh->do($query, undef, @values);
}
else {
@ -1137,7 +1137,7 @@ sub db_do ($$;@) {
};
if ($@) {
my $exception = @_;
if ($DBI::err == 1213) {
if ($DBI::err == 1213 || $DBI::err == 1205) {
$dbh->do($query, undef, @values);
}
else {