mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
01_FHEMWEB.pm: fix allowed checking in Everything (Forum #116026)
git-svn-id: https://svn.fhem.de/fhem/trunk@23209 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
110979a8e6
commit
df61c6745b
@ -1292,6 +1292,7 @@ FW_updateHashes()
|
|||||||
my $hre = AttrVal($FW_wname, "hiddenroomRegexp", "");
|
my $hre = AttrVal($FW_wname, "hiddenroomRegexp", "");
|
||||||
foreach my $d (devspec2array(".*", $FW_chash)) {
|
foreach my $d (devspec2array(".*", $FW_chash)) {
|
||||||
next if(IsIgnored($d));
|
next if(IsIgnored($d));
|
||||||
|
$FW_rooms{all}{$d} = 1;
|
||||||
|
|
||||||
foreach my $r (split(",", AttrVal($d, "room", "Unsorted"))) {
|
foreach my $r (split(",", AttrVal($d, "room", "Unsorted"))) {
|
||||||
next if($hre && $r =~ m/$hre/);
|
next if($hre && $r =~ m/$hre/);
|
||||||
@ -1319,16 +1320,13 @@ FW_updateHashes()
|
|||||||
|
|
||||||
|
|
||||||
$FW_room = AttrVal($FW_detail, "room", "Unsorted") if($FW_detail);
|
$FW_room = AttrVal($FW_detail, "room", "Unsorted") if($FW_detail);
|
||||||
|
@FW_roomsArr = sort grep { $_ ne "all" } keys %FW_rooms;
|
||||||
|
|
||||||
if(AttrVal($FW_wname, "sortRooms", "")) { # Slow!
|
if(AttrVal($FW_wname, "sortRooms", "")) { # Slow!
|
||||||
my @sortBy = split( " ", AttrVal( $FW_wname, "sortRooms", "" ) );
|
my @sortBy = split( " ", AttrVal( $FW_wname, "sortRooms", "" ) );
|
||||||
my %sHash;
|
my %sHash;
|
||||||
map { $sHash{$_} = FW_roomIdx(\@sortBy,$_) } keys %FW_rooms;
|
map { $sHash{$_} = FW_roomIdx(\@sortBy,$_) } keys %FW_rooms;
|
||||||
@FW_roomsArr = sort { $sHash{$a} cmp $sHash{$b} } keys %FW_rooms;
|
@FW_roomsArr = sort { $sHash{$a} cmp $sHash{$b} } @FW_roomsArr;
|
||||||
|
|
||||||
} else {
|
|
||||||
@FW_roomsArr = sort keys %FW_rooms;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1951,8 +1949,7 @@ FW_showRoom()
|
|||||||
@devs = () if( int(@devs) == 1 && !defined($defs{$devs[0]}) );
|
@devs = () if( int(@devs) == 1 && !defined($defs{$devs[0]}) );
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@devs= grep { (($FW_rooms{$FW_room} && $FW_rooms{$FW_room}{$_}) ||
|
@devs = grep { $FW_rooms{$FW_room} && $FW_rooms{$FW_room}{$_} } keys %defs;
|
||||||
$FW_room eq "all") && !IsIgnored($_) } keys %defs;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
my (%group, @atEnds, %usuallyAtEnd, %sortIndex);
|
my (%group, @atEnds, %usuallyAtEnd, %sortIndex);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user