From a96c30f036b13260559d15ae435492e9efa5794b Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Sun, 9 Feb 2020 15:05:13 +0000 Subject: [PATCH] 57_SSCal: contrib 1.7.0 git-svn-id: https://svn.fhem.de/fhem/trunk@21160 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/DS_Starter/57_SSCal.pm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/fhem/contrib/DS_Starter/57_SSCal.pm b/fhem/contrib/DS_Starter/57_SSCal.pm index 0729d3c29..755ccfcd4 100644 --- a/fhem/contrib/DS_Starter/57_SSCal.pm +++ b/fhem/contrib/DS_Starter/57_SSCal.pm @@ -50,7 +50,8 @@ eval "use FHEM::Meta;1" or my $modMetaAbsent = 1; my %SSCal_vNotesIntern = ( "1.7.0" => "09.02.2020 respect global language setting for some presentation, new attributes tableSpecs & tableColumnMap, days left in overview ". "formatting overview table, feature smallScreen for tableSpecs, rename attributes to tableFields, ". - "tableInDetail, tableInRoom, correct enddate/time if is_all_day incl. bugfix API ", + "tableInDetail, tableInRoom, correct enddate/time if is_all_day incl. bugfix API, function SSCal_boolean ". + "to avoid fhem crash if an older JSON module is installed ", "1.6.1" => "03.02.2020 rename attributes to \"calOverviewInDetail\",\"calOverviewInRoom\", bugfix of gps extraction ", "1.6.0" => "03.02.2020 new attribute \"tableFields\" to show specified fields in calendar overview in detail/room view, ". "Model Diary/Tasks defined, periodic call of ToDo-Liists now possible ", @@ -3242,7 +3243,7 @@ sub SSCal_jboolmap($){ my ($bool)= @_; if(JSON::is_bool($bool)) { - my $b = JSON::boolean($bool); + my $b = SSCal_boolean($bool); $bool = 1 if($b == $JSON::true); $bool = 0 if($b == $JSON::false); } @@ -3250,6 +3251,12 @@ sub SSCal_jboolmap($){ return $bool; } +sub SSCal_boolean { + # might be called as method or as function, so pop() to get the last arg + # instead of shift() to get the first + pop() ? $JSON::true : $JSON::false +} + ############################################################################################# # Kalenderliste als HTML-Tabelle zurückgeben ############################################################################################# @@ -3510,7 +3517,7 @@ Die Beschreibung des Moduls ist momentan nur im