Monotone-Parent: bf8a27927d587b1fe4c7daa42495a97dafe94db6

Monotone-Revision: df50b8dd4bddcee4db165e9ac01d6b6a17d8ad04

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-04-12T20:25:13
This commit is contained in:
Wolfgang Sourdeau
2012-04-12 20:25:13 +00:00
parent 4ca495a971
commit f09c4d5be1
2 changed files with 11 additions and 5 deletions

View File

@@ -5,6 +5,8 @@
(-fetchFields:from:to:title:component:additionalFilters:includeProtectedInformation:):
make use of a mutable array to define the global WHERE clause, by
joining the elements with " AND ".
(-additionalWebdavSyncFilters): don't include 'vtodo' components
when -[self showCalendarTasks] returns NO.
2012-04-11 Francis Lachapelle <flachapelle@inverse.ca>

View File

@@ -1675,21 +1675,25 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
{
NSCalendarDate *startDate;
NSString *filter;
NSMutableArray *filters;
int startDateSecs;
filters = [NSMutableArray arrayWithCapacity: 8];
startDate = [self _getMaxStartDate];
if (startDate)
{
startDateSecs = (int) [startDate timeIntervalSince1970];
filter = [NSString stringWithFormat: @"c_enddate = NULL"
filter = [NSString stringWithFormat: @"(c_enddate = NULL"
@" OR (c_enddate >= %d AND c_iscycle = 0)"
@" OR (c_cycleenddate >= %d AND c_iscycle = 1)",
@" OR (c_cycleenddate >= %d AND c_iscycle = 1))",
startDateSecs, startDateSecs];
[filters addObject: filter];
}
else
filter = @"";
return filter;
if (![self showCalendarTasks])
[filters addObject: @"c_component != 'vtodo'"];
return [filters componentsJoinedByString: @" AND "];
}
- (Class) objectClassForContent: (NSString *) content