2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

:for debug only

git-svn-id: https://svn.fhem.de/fhem/trunk@18724 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2019-02-24 22:54:37 +00:00
parent 78f5b2db30
commit 57dc384f4d

View File

@ -1716,13 +1716,19 @@ sub Calendar_Define($$) {
my $name = $a[0];
my $type = $a[3];
my $url = $a[4];
my $interval = 3600;
if($#a==5) {
$interval= $a[5] if ($a[5] > 0);
Log3 $hash,2,"Calendar $name: interval $a[5] not allowed. Using 3600 as default." if ($a[5] <= 0);
}
$url =~ /(^https?:\/\/)(.*:.*@)?(.*)/;
if($2) {
# credentials found in url, store them in keystore
setKeyValue($name,$2);
$url = $1.'credentials@'.$3;
$hash->{DEF} = "$a[2] $a[3] $url";
$hash->{DEF} = "$a[2] $a[3] $url $interval";
}
$url =~ /(^https?:\/\/.*google.*ical\/)(.*private-.*)(\/.*)/;
@ -1730,15 +1736,9 @@ sub Calendar_Define($$) {
# private key found in url, store it in keystore
setKeyValue($name,$2);
$url = $1.'credentials@'.$3;
$hash->{DEF} = "$a[2] $a[3] $url";
$hash->{DEF} = "$a[2] $a[3] $url $interval";
}
my $interval = 3600;
if($#a==5) {
$interval= $a[5] if ($a[5] > 0);
Log3 $hash,2,"Calendar $name: interval $a[5] not allowed. Using 3600 as default." if ($a[5] <= 0);
}
$hash->{".fhem"}{type}= $type;
$hash->{".fhem"}{url}= $url;
$hash->{".fhem"}{lasturl}= $url;