96_allowed.pm: fix the wizard for unusual FHEMWEB names (Forum #116231)

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@23246 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2020-11-28 10:29:02 +00:00
parent 9e31daf247
commit 4f4aeb513e

View File

@ -354,13 +354,13 @@ allowed_fhemwebFn($$$$)
my ($FW_wname, $d, $room, $pageHash) = @_; # pageHash is set for summaryFn. my ($FW_wname, $d, $room, $pageHash) = @_; # pageHash is set for summaryFn.
my $hash = $defs{$d}; my $hash = $defs{$d};
my $vf = $defs{$d}{validFor} ? $defs{$d}{validFor} : ""; my %vf = map {$_,1} split(",", $defs{$d}{validFor} ? $defs{$d}{validFor}:"");
my (@F_arr, @t_arr); my (@F_arr, @t_arr);
my @arr = map { my @arr = map {
my $ca = $modules{$defs{$_}{TYPE}}{CanAuthenticate}; my $ca = $modules{$defs{$_}{TYPE}}{CanAuthenticate};
push(@F_arr, $_) if($ca == 1); push(@F_arr, $_) if($ca == 1);
push(@t_arr, $_) if($ca == 2); push(@t_arr, $_) if($ca == 2);
"<input type='checkbox' ".($vf =~ m/\b$_\b/ ? "checked ":""). "<input type='checkbox' ".($vf{$_} ? "checked ":"").
"name='$_' class='vfAttr'><label>$_</label>" "name='$_' class='vfAttr'><label>$_</label>"
} }
grep { !$defs{$_}{SNAME} && grep { !$defs{$_}{SNAME} &&