mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-05 12:00:33 +00:00
Monotone-Parent: c33c456b52c6e6d4ee1f29bfd9ca57096b8d13be
Monotone-Revision: 5539e3c473023281dd04f7cb8a8fee051ac0735d Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-04-11T19:08:58 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -47,14 +47,17 @@
|
||||
- (NSString *) contentAsString
|
||||
{
|
||||
NSCalendarDate *today, *startDate, *endDate;
|
||||
NSTimeZone *timeZone;
|
||||
|
||||
today = [[NSCalendarDate calendarDate] beginOfDay];
|
||||
[today setTimeZone: [self userTimeZone]];
|
||||
timeZone = [[context activeUser] timeZone];
|
||||
[today setTimeZone: timeZone];
|
||||
|
||||
startDate = [today dateByAddingYears: 0 months: 0 days: -14
|
||||
hours: 0 minutes: 0 seconds: 0];
|
||||
endDate = [startDate dateByAddingYears: 0 months: 1 days: 0
|
||||
hours: 0 minutes: 0 seconds: 0];
|
||||
|
||||
return [self contentAsStringFrom: startDate to: endDate];
|
||||
}
|
||||
|
||||
@@ -72,16 +75,13 @@
|
||||
{
|
||||
id calFolder;
|
||||
SoSecurityManager *sm;
|
||||
WOApplication *woApp;
|
||||
NSArray *infos;
|
||||
|
||||
woApp = [WOApplication application];
|
||||
|
||||
calFolder = [container lookupName: @"Calendar" inContext: nil acquire: NO];
|
||||
sm = [SoSecurityManager sharedSecurityManager];
|
||||
if (![sm validatePermission: SOGoPerm_FreeBusyLookup
|
||||
onObject: calFolder
|
||||
inContext: [woApp context]])
|
||||
inContext: context]])
|
||||
infos = [calFolder fetchFreeBusyInfosFrom: _startDate
|
||||
to: _endDate];
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user