76_Solarforcast: contrib 0.79.0

git-svn-id: https://svn.fhem.de/fhem/trunk@27583 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
DS_Starter
2023-05-17 08:36:14 +00:00
parent 5a66bc2c44
commit 97c92f7dfd

View File

@@ -2638,7 +2638,7 @@ sub Attr {
}
if ($aName eq "ctrlUserExitFn") {
if($cmd eq "set") {
if($cmd eq "set" && $init_done) {
if(!$aVal || $aVal !~ m/^\s*(\{.*\})\s*$/xs) {
return "Usage of $aName is wrong. The function has to be specified as \"{<your own code>}\" ";
}
@@ -10694,9 +10694,6 @@ sub userExit {
my $r;
#$value =~ s/\\/\\\\/g; # escapen of chars for evaluation
#$value =~ s/'/\\'/g;
$uefn = join ' ', split(/\s+/sx, $uefn); # Funktion aus Attr ctrlUserExitFn serialisieren
if ($uefn =~ m/^\s*(\{.*\})\s*$/xs) { # unnamed Funktion direkt in ctrlUserExitFn mit {...}