From b398b6a690e4b49222d843c255e46bf6aca17290 Mon Sep 17 00:00:00 2001 From: "dmose%mozilla.org" Date: Wed, 31 May 2006 20:32:02 +0000 Subject: [PATCH] Make tasks in the multiweek and month views show up even if their start date is earlier than the start of the view (bug 335643), patch by Thomas Benisch , r=dmose --- calendar/providers/storage/calStorageCalendar.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/calendar/providers/storage/calStorageCalendar.js b/calendar/providers/storage/calStorageCalendar.js index d3c72f270ddc..7947a6c3ee7a 100644 --- a/calendar/providers/storage/calStorageCalendar.js +++ b/calendar/providers/storage/calStorageCalendar.js @@ -720,9 +720,8 @@ calStorageCalendar.prototype = { // to fall within the range sp = this.mSelectTodosByRange.params; sp.cal_id = this.mCalId; - sp.range_start = startTime; sp.range_end = endTime; - sp.offset = aRangeStart ? aRangeStart.timezoneOffset * USECS_PER_SECOND : 0; + sp.end_offset = aRangeEnd ? aRangeEnd.timezoneOffset * USECS_PER_SECOND : 0; while (this.mSelectTodosByRange.step()) { var row = this.mSelectTodosByRange.row; @@ -1071,16 +1070,14 @@ calStorageCalendar.prototype = { " AND cal_id = :cal_id AND recurrence_id IS NULL" ); - var floatingTodoEntry = "todo_entry_tz = 'floating' AND todo_entry - :offset" + var floatingTodoEntry = "todo_entry_tz = 'floating' AND todo_entry" var nonFloatingTodoEntry = "todo_entry_tz != 'floating' AND todo_entry" this.mSelectTodosByRange = createStatement( this.mDB, "SELECT * FROM cal_todos " + "WHERE " + - " (((("+floatingTodoEntry+" >= :range_start) OR " + - " ("+nonFloatingTodoEntry+" >= :range_start)) AND " + - " (("+floatingTodoEntry+" < :range_end) OR " + - " ("+nonFloatingTodoEntry+" < :range_end))) " + + " ((("+floatingTodoEntry+" < :range_end + :end_offset) OR " + + " ("+nonFloatingTodoEntry+" < :range_end)) " + " OR (todo_entry IS NULL)) " + " AND cal_id = :cal_id AND recurrence_id IS NULL" );