fix: Calendar Next / Previous when startTime was involved

This commit is contained in:
Jukka Raimovaara 2007-02-16 03:18:24 +00:00
parent e594cb3d6c
commit 8bac5fd39a
2 changed files with 7 additions and 6 deletions

View file

@ -7,6 +7,7 @@
- Fixed a problem where you couldn't upgrade directly to 7.3.9 from versions - Fixed a problem where you couldn't upgrade directly to 7.3.9 from versions
earlier than 7.3.8. earlier than 7.3.8.
- fix: Rich Text Editor - Add Asset Tree Link doesn't work with images - 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 7.3.9
- fix: SQL Form and big table imports - fix: SQL Form and big table imports

View file

@ -353,16 +353,16 @@ sub getEventNext {
# All day events must either look for null time or greater than 00:00:00 # All day events must either look for null time or greater than 00:00:00
if ($self->isAllDay) { if ($self->isAllDay) {
$where .= "(Event.startTime IS NULL " $where .= "((Event.startTime IS NULL "
. "&& assetData.title > ".$db->quote($self->get("title")).") " . "&& 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 # Non all-day events must look for greater than time
else else
{ {
$where .= "(Event.startTime = '".$self->get("startTime")."' " $where .= "((Event.startTime = '".$self->get("startTime")."' "
. "&& assetData.title > ".$db->quote($self->get("title")).")" . "&& assetData.title > ".$db->quote($self->get("title")).")"
. "|| Event.startTime > '".$self->get("startTime")."'"; . "|| Event.startTime > '".$self->get("startTime")."')";
} }
$where .= ")"; $where .= ")";
@ -416,9 +416,9 @@ sub getEventPrev {
} }
# Non all-day events must look for greater than time # Non all-day events must look for greater than time
else { else {
$where .= "(Event.startTime = '".$self->get("startTime")."' " $where .= "((Event.startTime = '".$self->get("startTime")."' "
. "&& assetData.title < ".$db->quote($self->get("title")).")" . "&& assetData.title < ".$db->quote($self->get("title")).")"
. "|| Event.startTime < '".$self->get("startTime")."'"; . "|| Event.startTime < '".$self->get("startTime")."')";
} }
$where .= ")"; $where .= ")";