2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

93_DbRep: 7.15.1, sqlCmd accept widget textField-long, Internal MODEL is set

git-svn-id: https://svn.fhem.de/fhem/trunk@16592 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2018-04-11 21:38:20 +00:00
parent 9e25a78327
commit 430044a33d
2 changed files with 10 additions and 6 deletions

View File

@ -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.
- change: 93_DbRep: 7.15.1, sqlCmd accept widget textField-long,
Internal MODEL is set
- feature: 72_FB_CALLMONITOR: new attribute "sendKeepAlive" to send cyclic - feature: 72_FB_CALLMONITOR: new attribute "sendKeepAlive" to send cyclic
keep-alives when connected FritzBox for example keep-alives when connected FritzBox for example
is located behind another NAT router is located behind another NAT router

View File

@ -37,6 +37,7 @@
########################################################################################################################### ###########################################################################################################################
# Versions History: # Versions History:
# #
# 7.15.1 11.04.2018 sqlCmd accept widget textField-long, Internal MODEL is set
# 7.15.0 24.03.2018 new command sqlSpecial # 7.15.0 24.03.2018 new command sqlSpecial
# 7.14.8 21.03.2018 fix no save into database if value=0 (DbRep_OutputWriteToDB) # 7.14.8 21.03.2018 fix no save into database if value=0 (DbRep_OutputWriteToDB)
# 7.14.7 21.03.2018 exportToFile,importFromFile can use file as an argument and executeBeforeDump, # 7.14.7 21.03.2018 exportToFile,importFromFile can use file as an argument and executeBeforeDump,
@ -332,7 +333,7 @@ no if $] >= 5.017011, warnings => 'experimental::smartmatch';
sub DbRep_Main($$;$); sub DbRep_Main($$;$);
sub DbLog_cutCol($$$$$$$); # DbLog-Funktion nutzen um Daten auf maximale Länge beschneiden sub DbLog_cutCol($$$$$$$); # DbLog-Funktion nutzen um Daten auf maximale Länge beschneiden
my $DbRepVersion = "7.15.0"; my $DbRepVersion = "7.15.1";
my %dbrep_col = ("DEVICE" => 64, my %dbrep_col = ("DEVICE" => 64,
"TYPE" => 64, "TYPE" => 64,
@ -782,9 +783,10 @@ sub DbRep_Set($@) {
$sqlcmd = $prop; $sqlcmd = $prop;
} }
if($opt eq "sqlCmd") { if($opt eq "sqlCmd") {
shift @a; my @cmd = @a;
shift @a; shift @cmd; shift @cmd;
$sqlcmd = join(" ", @a); $sqlcmd = join(" ", @cmd);
$sqlcmd =~ tr/ A-Za-z0-9!"#$%&'()*+,-.\/:;<=>?@[\\]^_`{|}~äöüÄÖÜ߀/ /cs;
} }
if($opt eq "sqlCmdHistory") { if($opt eq "sqlCmdHistory") {
$prop =~ tr/ A-Za-z0-9!"#$%&'()*+,-.\/:;<=>?@[\\]^_`{|}~äöüÄÖÜ߀/ /cs; $prop =~ tr/ A-Za-z0-9!"#$%&'()*+,-.\/:;<=>?@[\\]^_`{|}~äöüÄÖÜ߀/ /cs;
@ -1036,7 +1038,6 @@ sub DbRep_Attr($$$$) {
foreach (@agentnoattr) { foreach (@agentnoattr) {
delete($attr{$name}{$_}); delete($attr{$name}{$_});
} }
$attr{$name}{icon} = "security"; $attr{$name}{icon} = "security";
} }
$do = $aVal; $do = $aVal;
@ -1044,6 +1045,7 @@ sub DbRep_Attr($$$$) {
$do = "Client"; $do = "Client";
} }
$hash->{ROLE} = $do; $hash->{ROLE} = $do;
$hash->{MODEL} = $hash->{ROLE};
delete($attr{$name}{icon}) if($do eq "Client"); delete($attr{$name}{icon}) if($do eq "Client");
} }