mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
93_DbRep: V5.8.6, don't limit length of attr reading/device if attr contains a list
git-svn-id: https://svn.fhem.de/fhem/trunk@15352 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
77512bd528
commit
b9c795d64b
@ -1,5 +1,7 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- bugfix: 93_DbRep: V5.8.6, don't limit length of attr reading/device if
|
||||||
|
attr contains a list
|
||||||
- feature: 70_KODI: added reading jsonResponse which contains the last
|
- feature: 70_KODI: added reading jsonResponse which contains the last
|
||||||
received message from Kodi
|
received message from Kodi
|
||||||
- feature: 46_Aqicn: FHEMWEB text color formated, thanks to maddhin
|
- feature: 46_Aqicn: FHEMWEB text color formated, thanks to maddhin
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
###########################################################################################################################
|
###########################################################################################################################
|
||||||
# Versions History:
|
# Versions History:
|
||||||
#
|
#
|
||||||
|
# 5.8.6 30.10.2017 don't limit length of attr reading/device if attr contains a list
|
||||||
# 5.8.5 19.10.2017 filter unwanted characters in "procinfo"-result
|
# 5.8.5 19.10.2017 filter unwanted characters in "procinfo"-result
|
||||||
# 5.8.4 17.10.2017 createSelectSql, createDeleteSql, currentfillup_Push switch to devspec
|
# 5.8.4 17.10.2017 createSelectSql, createDeleteSql, currentfillup_Push switch to devspec
|
||||||
# 5.8.3 16.10.2017 change to use createSelectSql: minValue,diffValue - createDeleteSql: delEntries
|
# 5.8.3 16.10.2017 change to use createSelectSql: minValue,diffValue - createDeleteSql: delEntries
|
||||||
@ -244,7 +245,7 @@ use Encode qw(encode_utf8);
|
|||||||
|
|
||||||
sub DbRep_Main($$;$);
|
sub DbRep_Main($$;$);
|
||||||
|
|
||||||
my $DbRepVersion = "5.8.5";
|
my $DbRepVersion = "5.8.6";
|
||||||
|
|
||||||
my %dbrep_col = ("DEVICE" => 64,
|
my %dbrep_col = ("DEVICE" => 64,
|
||||||
"TYPE" => 64,
|
"TYPE" => 64,
|
||||||
@ -793,10 +794,11 @@ sub DbRep_Attr($$$$) {
|
|||||||
|
|
||||||
if ($aName eq "reading" || $aName eq "device") {
|
if ($aName eq "reading" || $aName eq "device") {
|
||||||
if ($dbmodel && $dbmodel ne 'SQLITE') {
|
if ($dbmodel && $dbmodel ne 'SQLITE') {
|
||||||
if ($dbmodel eq 'POSTGRESQL') {
|
my $attrname = uc($aName);
|
||||||
return "Length of \"$aName\" is too big. Maximum length for database type $dbmodel is $dbrep_col{READING}" if(length($aVal) > $dbrep_col{READING});
|
if ($dbmodel eq 'POSTGRESQL' && $aVal !~ m/,/) {
|
||||||
} elsif ($dbmodel eq 'MYSQL') {
|
return "Length of \"$aName\" is too big. Maximum length for database type $dbmodel is $dbrep_col{$attrname}" if(length($aVal) > $dbrep_col{$attrname});
|
||||||
return "Length of \"$aName\" is too big. Maximum length for database type $dbmodel is $dbrep_col{READING}" if(length($aVal) > $dbrep_col{READING});
|
} elsif ($dbmodel eq 'MYSQL' && $aVal !~ m/,/) {
|
||||||
|
return "Length of \"$aName\" is too big. Maximum length for database type $dbmodel is $dbrep_col{$attrname}" if(length($aVal) > $dbrep_col{$attrname});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user