diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 80cb5c8e0..6d26a6f6c 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -7,6 +7,7 @@ - Fixed a problem where you couldn't upgrade directly to 7.3.9 from versions earlier than 7.3.8. - fix: Rich Text Editor - Add Asset Tree Link doesn't work with images + - fix: Calendar Next / Previous when startTime was involved (Jukka Raimovaara / Axxion Oy) 7.3.9 - fix: SQL Form and big table imports diff --git a/lib/WebGUI/Asset/Event.pm b/lib/WebGUI/Asset/Event.pm index d004020cb..56d867fe5 100644 --- a/lib/WebGUI/Asset/Event.pm +++ b/lib/WebGUI/Asset/Event.pm @@ -353,16 +353,16 @@ sub getEventNext { # All day events must either look for null time or greater than 00:00:00 if ($self->isAllDay) { - $where .= "(Event.startTime IS NULL " + $where .= "((Event.startTime IS NULL " . "&& assetData.title > ".$db->quote($self->get("title")).") " - . "|| Event.startTime >= '00:00:00'"; + . "|| Event.startTime >= '00:00:00')"; } # Non all-day events must look for greater than time else { - $where .= "(Event.startTime = '".$self->get("startTime")."' " + $where .= "((Event.startTime = '".$self->get("startTime")."' " . "&& assetData.title > ".$db->quote($self->get("title")).")" - . "|| Event.startTime > '".$self->get("startTime")."'"; + . "|| Event.startTime > '".$self->get("startTime")."')"; } $where .= ")"; @@ -416,9 +416,9 @@ sub getEventPrev { } # Non all-day events must look for greater than time else { - $where .= "(Event.startTime = '".$self->get("startTime")."' " + $where .= "((Event.startTime = '".$self->get("startTime")."' " . "&& assetData.title < ".$db->quote($self->get("title")).")" - . "|| Event.startTime < '".$self->get("startTime")."'"; + . "|| Event.startTime < '".$self->get("startTime")."')"; } $where .= ")";