From 6ee7dfa09941840d51ed5cbc8b07485ad4d0bee9 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Wed, 12 Sep 2007 20:45:51 +0000 Subject: [PATCH] fix: Event isOneDay template var now works properly when Event is not an all-day event --- docs/changelog/7.x.x.txt | 2 ++ lib/WebGUI/Asset/Event.pm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index d474ae6dd..ab2b8442b 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -42,6 +42,8 @@ - fix: Use previous form value for Subscribe on CS preview - Use current subscription status on form for CS reply, unsubscribe if set to no - add: WebGUI::Form::CheckList now has optional "Select All" button + - fix: Event isOneDay template variable now works properly when Event isn't an + all-day event 7.4.5 - fix: Apostrophy incorrectly escaped as double quote in some places diff --git a/lib/WebGUI/Asset/Event.pm b/lib/WebGUI/Asset/Event.pm index 6be7eeeef..9298e01e5 100644 --- a/lib/WebGUI/Asset/Event.pm +++ b/lib/WebGUI/Asset/Event.pm @@ -1217,7 +1217,7 @@ sub getTemplateVars { $var{ "endDateEpoch" } = $dtEnd->epoch; $var{ "isAllDay" } = $self->isAllDay; - $var{ "isOneDay" } = $var{isAllDay} && $var{startDateDmy} eq $var{endDateDmy} + $var{ "isOneDay" } = $var{startDateDmy} eq $var{endDateDmy} ? 1 : 0 ;