mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
fixed an error with perl 8.x
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@2647 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
78d6e4ad48
commit
703165453e
@ -68,7 +68,7 @@ CommandNotice($$)
|
|||||||
|
|
||||||
$args[0] = "list" if(!defined($args[0]));
|
$args[0] = "list" if(!defined($args[0]));
|
||||||
|
|
||||||
if(!@args || $args[0] ~~ @commands) {
|
if(!@args ||grep (m/^$args[0]$/, @commands)) {
|
||||||
my $cmd = $args[0];
|
my $cmd = $args[0];
|
||||||
|
|
||||||
if($cmd eq "list") {
|
if($cmd eq "list") {
|
||||||
@ -93,15 +93,16 @@ CommandNotice($$)
|
|||||||
my $locale = "en";
|
my $locale = "en";
|
||||||
my $header = 1;
|
my $header = 1;
|
||||||
if(@args == 3) {
|
if(@args == 3) {
|
||||||
$locale = ($args[2] ~~ @locale) ? $args[2] : "en";
|
$locale = (grep (m/^$args[2]$/, @locale)) ? $args[2] : "en";
|
||||||
|
$locale = (grep (m/^$args[2]$/, @locale)) ? $args[2] : "en";
|
||||||
$header = ($args[2] eq "noheader") ? 0 : 1;
|
$header = ($args[2] eq "noheader") ? 0 : 1;
|
||||||
} elsif(@args == 4) {
|
} elsif(@args == 4) {
|
||||||
if($args[2] ~~ @locale) {
|
if(grep (m/^$args[2]$/, @locale)) {
|
||||||
$locale = ($args[2] ~~ @locale) ? $args[2] : "en";
|
$locale = (grep (m/^$args[2]$/, @locale)) ? $args[2] : "en";
|
||||||
$header = ($args[3] eq "noheader") ? 0 : 1;
|
$header = ($args[3] eq "noheader") ? 0 : 1;
|
||||||
} elsif($args[2] eq "noheader") {
|
} elsif($args[2] eq "noheader") {
|
||||||
$header = ($args[2] eq "noheader") ? 0 : 1;
|
$header = ($args[2] eq "noheader") ? 0 : 1;
|
||||||
$locale = ($args[3] ~~ @locale) ? $args[3] : "en";
|
$locale = (grep (m/^$args[3]$/, @locale)) ? $args[3] : "en";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user