From 0c583fe466233bc50bc3afef052fc436f8ac44e8 Mon Sep 17 00:00:00 2001 From: betateilchen Date: Sun, 24 Feb 2019 10:35:53 +0000 Subject: [PATCH] 57_Calendar.pm: wildcards must not be used with google calendars, will now be detected automatically git-svn-id: https://svn.fhem.de/fhem/trunk@18710 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/57_Calendar.pm | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/fhem/FHEM/57_Calendar.pm b/fhem/FHEM/57_Calendar.pm index a2535d902..323ce8c30 100644 --- a/fhem/FHEM/57_Calendar.pm +++ b/fhem/FHEM/57_Calendar.pm @@ -1727,6 +1727,7 @@ sub Calendar_Define($$) { $hash->{".fhem"}{lastid}= 0; $hash->{".fhem"}{vevents}= {}; $hash->{".fhem"}{nxtUpdtTs}= 0; + $hash->{".fhem"}{noWildcards} = ($url =~ /google/) ? 1 : 0; #$attr{$name}{"hideOlderThan"}= 0; @@ -2485,7 +2486,7 @@ sub Calendar_GetUpdate($$$;$) { } my $url = $hash->{".fhem"}{url}; - unless (AttrVal($name,'quirks','') =~ /noWildcards/) { + unless ($hash->{".fhem"}{noWildcards} == 1 || AttrVal($name,'quirks','') =~ /noWildcards/) { my @ti = localtime; $url = ResolveDateWildcards($hash->{".fhem"}{url}, @ti); } @@ -3246,14 +3247,19 @@ sub CalendarEventsAsHtml($;$) {
  • %W week number of year with Monday as first day of week (00..53)

  • - Wildcards in url will be evaluated on every calendar update.
    + - Wildcards in url will be evaluated on every calendar update.
    + - The evaluation of wildcards maybe disabled by adding literal 'noWildcards' to attribute 'quirks'. + This may be useful in url containing % without marking a wildcard.
    +
    + Note for users of Google Calendar: +
    - Note for users of Google Calendar: You can literally use the private ICal URL from your Google Calendar. - If your Google Calendar - URL starts with https:// and the perl module IO::Socket::SSL is not installed on your system, you can - replace it by http:// if and only if there is no redirection to the https:// URL. - Check with your browser first if unsure.

    - Note for users of Netxtcloud Calendar: you can use an URL of the form https://admin:admin@demo.nextcloud.com/wid0ohgh/remote.php/dav/calendars/admin/personal/?export.

    @@ -3905,14 +3911,19 @@ sub CalendarEventsAsHtml($;$) {

  • %W Wochennummer des Jahres, wobei Wochenbeginn = Montag (00..53)

  • - Die wildcards werden bei jedem Kalenderupdate ausgewertet.
    + -Die wildcards werden bei jedem Kalenderupdate ausgewertet.
    + -Die Auswertung von wildcards kann bei Bedarf fü einen Kalender deaktiviert werden, indem das Schlüsselwort 'noWildcards' + dem Attribut 'quirks' hinzugefügt wird. Das ist nützlich bei url die bereits ein % enthalten, ohne damit ein wildcard + zu kennzeichnen.

    - Hinweis für Nutzer des Google-Kalenders: Du kannst direkt die private iCal-URL des Google-Kalenders nutzen. - - Sollte deine Google-Kalender-URL mit https:// beginnen und das Perl-Modul IO::Socket::SSL ist nicht auf deinem System installiert, + Hinweise für Nutzer des Google-Kalenders: + Hinweis für Nutzer des Nextcloud-Kalenders: Du kannst eine URL der folgenden Form benutzen: https://admin:admin@demo.nextcloud.com/wid0ohgh/remote.php/dav/calendars/admin/personal/?export.