2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-09 20:57:11 +00:00

57_Calendar: new attribute quirks with ignoreDtStamp value.

git-svn-id: https://svn.fhem.de/fhem/trunk@17422 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
borisneubert 2018-09-28 19:45:54 +00:00
parent 360e06f3b2
commit 9d8d065781
2 changed files with 31 additions and 3 deletions

View File

@ -1,5 +1,8 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
- change: 57_Calendar: new attribute quirks with ignoreDtStamp value.
- change: 57_Calendar: cutoffOlderThan also removes recurring events when
the series has ended.
- change: 55_DWD_OpenData: KML based forecast, readings have changed,
attr forecastProperties must be updated (forum #83097)
- bugfix: 12_HProtocolGateway: Filllevel conversion corrected

View File

@ -1685,7 +1685,7 @@ sub Calendar_Initialize($) {
$hash->{NotifyFn}= "Calendar_Notify";
$hash->{AttrList}= "update:sync,async,none removevcalendar:0,1 " .
"cutoffOlderThan hideOlderThan hideLaterThan onCreateEvent " .
"ignoreCancelled:0,1 " .
"ignoreCancelled:0,1 quirks " .
"SSLVerify:0,1 defaultFormat defaultTimeFormat " .
$readingFnAttributes;
}
@ -2719,11 +2719,15 @@ sub Calendar_UpdateCalendar($$) {
my ($hash, $ical)= @_;
my $name= $hash->{NAME};
my @quirks= split(",", AttrVal($name, "quirks", ""));
my $nodtstamp= "ignoreDTSTAMP" ~~ @quirks;
# *******************************
# *** Step 1 Digest Parser Result
# *******************************
my $name= $hash->{NAME};
my $error= $ical->{error};
my $state= $ical->{state};
@ -2811,6 +2815,7 @@ sub Calendar_UpdateCalendar($$) {
$cutoff= $t- $cutoffT;
}
foreach my $v (grep { $_->{type} eq "VEVENT" } @{$root->{entries}}) {
# totally skip outdated calendar entries
@ -2857,7 +2862,7 @@ sub Calendar_UpdateCalendar($$) {
# and same SEQUENCE
#
if($v0->sameValue($v, "LAST-MODIFIED") &&
$v0->sameValue($v, "DTSTAMP")) {
($nodtstamp || $v0->sameValue($v, "DTSTAMP"))) {
#
# is not modified
#
@ -3531,6 +3536,15 @@ sub CalendarEventsAsHtml($;$) {
although they are cancelled.
</li><p>
<li><code>quirks &lt;values&gt;</code><br>
Parameters to handle special situations. <code>&lt;values&gt;</code> is
a comma-separated list of the following keywords:
<ul>
<li><code>ignoreDtStamp</code>: if present, a modified DTSTAMP attribute of a calendar event
does not signify that the calendar event was modified.</li>
</ul>
</li><p>
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
</ul>
@ -3993,6 +4007,17 @@ sub CalendarEventsAsHtml($;$) {
Serie zur&uuml;ckgegeben werden, die gel&ouml;scht sind.
</li><p>
<li><code>quirks &lt;values&gt;</code><br>
Parameter f&uuml;r spezielle Situationen. <code>&lt;values&gt;</code> ist
eine mit Kommas getrennte Liste der folgenden Schl&uuml;sselw&ouml;rter:
<ul>
<li><code>ignoreDtStamp</code>: wenn gesetzt, dann zeigt
ein ver&auml;ndertes DTSTAMP Attribut eines Termins nicht an, dass
der Termin ver&auml;ndert wurde.</li>
</ul>
</li><p>
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
</ul>
<br>