2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

HMInfo:bugfix templist

git-svn-id: https://svn.fhem.de/fhem/trunk@16563 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2018-04-07 18:30:37 +00:00
parent 8736e615d1
commit 90c995ab3b

View File

@ -787,7 +787,6 @@ sub HMinfo_tempList(@) { ######################################################
} }
sub HMinfo_tempListTmpl(@) { ################################################## sub HMinfo_tempListTmpl(@) { ##################################################
my ($hiN,$filter,$tmpl,$action,$fName)=@_; my ($hiN,$filter,$tmpl,$action,$fName)=@_;
Log 1,"General ----- $action:$fName";
$filter = "." if (!$filter); $filter = "." if (!$filter);
my %dl =("Sat"=>0,"Sun"=>1,"Mon"=>2,"Tue"=>3,"Wed"=>4,"Thu"=>5,"Fri"=>6); my %dl =("Sat"=>0,"Sun"=>1,"Mon"=>2,"Tue"=>3,"Wed"=>4,"Thu"=>5,"Fri"=>6);
my $ret = ""; my $ret = "";
@ -888,7 +887,7 @@ sub HMinfo_tempListTmplView() { ###############################################
$ret .= "\ndevices not using tempList templates:\n => " .join("\n => ",@dWoTmpl) if (@dWoTmpl); $ret .= "\ndevices not using tempList templates:\n => " .join("\n => ",@dWoTmpl) if (@dWoTmpl);
return $ret; return $ret;
} }
sub HMinfo_tempListDefFns(@) { ################################################# sub HMinfo_tempListDefFns(@) { ################################################
my ($fn) = shift; my ($fn) = shift;
$fn = "" if (!defined $fn); $fn = "" if (!defined $fn);
@ -906,6 +905,7 @@ sub HMinfo_listOfTempTemplates() { ############################################
my ($n) =devspec2array("TYPE=HMinfo"); my ($n) =devspec2array("TYPE=HMinfo");
my $dir = AttrVal($n,"configDir","$attr{global}{modpath}/")."/"; #no dir? add defDir my $dir = AttrVal($n,"configDir","$attr{global}{modpath}/")."/"; #no dir? add defDir
$dir = "./".$dir if ($dir !~ m/^(\.|\/)/); $dir = "./".$dir if ($dir !~ m/^(\.|\/)/);
$dir =~ s/\/\//\//g;
my @tFiles = split('[;,]',AttrVal($n,"configTempFile","tempList.cfg")); my @tFiles = split('[;,]',AttrVal($n,"configTempFile","tempList.cfg"));
my $tDefault = $dir.$tFiles[0].":"; my $tDefault = $dir.$tFiles[0].":";
my @tmpl; my @tmpl;
@ -2119,6 +2119,7 @@ sub HMinfo_getConfigFile($$$) {################################################
$fnt = AttrVal("global","modpath",".")."\/".$fnt if ($fnt !~ m/^\//); $fnt = AttrVal("global","modpath",".")."\/".$fnt if ($fnt !~ m/^\//);
push @fns,$fnt; push @fns,$fnt;
} }
$_ =~ s/\.\/\.\//\.\// foreach(@fns);
return join(";",@fns); return join(";",@fns);
} }