From 430044a33db6c0efd447cadb2b105bdee1195d2c Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Wed, 11 Apr 2018 21:38:20 +0000 Subject: [PATCH] 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 --- fhem/CHANGED | 2 ++ fhem/FHEM/93_DbRep.pm | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 92f7711bd..ddeead8c2 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,7 @@ # 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. + - 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 keep-alives when connected FritzBox for example is located behind another NAT router diff --git a/fhem/FHEM/93_DbRep.pm b/fhem/FHEM/93_DbRep.pm index 7e4e6149a..6c9a40f0a 100644 --- a/fhem/FHEM/93_DbRep.pm +++ b/fhem/FHEM/93_DbRep.pm @@ -37,6 +37,7 @@ ########################################################################################################################### # 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.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, @@ -332,7 +333,7 @@ no if $] >= 5.017011, warnings => 'experimental::smartmatch'; sub DbRep_Main($$;$); 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, "TYPE" => 64, @@ -782,9 +783,10 @@ sub DbRep_Set($@) { $sqlcmd = $prop; } if($opt eq "sqlCmd") { - shift @a; - shift @a; - $sqlcmd = join(" ", @a); + my @cmd = @a; + shift @cmd; shift @cmd; + $sqlcmd = join(" ", @cmd); + $sqlcmd =~ tr/ A-Za-z0-9!"#$%&'()*+,-.\/:;<=>?@[\\]^_`{|}~äöüÄÖÜ߀/ /cs; } if($opt eq "sqlCmdHistory") { $prop =~ tr/ A-Za-z0-9!"#$%&'()*+,-.\/:;<=>?@[\\]^_`{|}~äöüÄÖÜ߀/ /cs; @@ -1036,14 +1038,14 @@ sub DbRep_Attr($$$$) { foreach (@agentnoattr) { delete($attr{$name}{$_}); } - $attr{$name}{icon} = "security"; } $do = $aVal; } else { $do = "Client"; } - $hash->{ROLE} = $do; + $hash->{ROLE} = $do; + $hash->{MODEL} = $hash->{ROLE}; delete($attr{$name}{icon}) if($do eq "Client"); }