See ChangeLog

Monotone-Parent: 18e33d0c1964c0a62a8a43c69d2300477fb492b5
Monotone-Revision: 2d01f07e3065ada858d69113aed1fd68f365ab66

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2008-12-23T18:39:36
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Francis Lachapelle 2008-12-23 18:39:36 +00:00
parent 46ae8aa3d6
commit ea017e67b6
3 changed files with 38 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2008-12-23 Francis Lachapelle <flachapelle@inverse.ca>
* UI/Scheduler/UIxAppointmentEditor.m ([UIxAppointmentEditor
-_adjustRecurrentRules]): new method to adjust the until date of a
recurrent rule using the start time of the event.
2008-12-21 Ludovic Marcotte <lmarcotte@inverse.ca>
* Added the "sent-by" field to all invitation

2
NEWS
View File

@ -4,6 +4,8 @@
- improved drag handles behavior
- added support for LDAP-based configuration
- improved init script when killing proccesses
- improved the ACL editor of the calendar web module
- fixed handling of timezones in daily and weekly events
1.0-20080826 (1.0 rc8)
----------------------

View File

@ -23,6 +23,7 @@
#include <math.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSEnumerator.h>
#import <NGObjWeb/SoObject.h>
#import <NGObjWeb/SoPermissions.h>
@ -41,6 +42,7 @@
#import <SoObjects/SOGo/SOGoUser.h>
#import <SoObjects/SOGo/SOGoDateFormatter.h>
#import <SoObjects/SOGo/SOGoContentObject.h>
#import <SoObjects/SOGo/SOGoPermissions.h>
#import <SoObjects/Appointments/SOGoAppointmentFolder.h>
#import <SoObjects/Appointments/SOGoAppointmentObject.h>
#import <SoObjects/Appointments/SOGoAppointmentOccurence.h>
@ -271,6 +273,30 @@
return result;
}
- (void) _adjustRecurrentRules
{
iCalRecurrenceRule *rule;
NSEnumerator *rules;
NSCalendarDate *untilDate;
rules = [[event recurrenceRules] objectEnumerator];
while ((rule = [rules nextObject]))
{
untilDate = [rule untilDate];
if (untilDate)
{
// The until date must match the time of the start date
untilDate = [untilDate dateByAddingYears:0
months:0
days:0
hours:[[event startDate] hourOfDay]
minutes:[[event startDate] minuteOfHour]
seconds:0];
[rule setUntilDate: untilDate];
}
}
}
- (id <WOActionResults>) saveAction
{
SOGoAppointmentFolder *previousCalendar;
@ -305,6 +331,9 @@
}
else
{
if ([event hasRecurrenceRules])
[self _adjustRecurrentRules];
// The event was modified -- save it.
[co saveComponent: event];
@ -330,14 +359,12 @@
{
WOResponse *result;
NSDictionary *data;
SOGoAppointmentFolder *co;
SOGoDateFormatter *dateFormatter;
SOGoUser *user;
NSCalendarDate *startDate;
result = [context response];
user = [context activeUser];
co = [self clientObject];
dateFormatter = [user dateFormatterInContext: context];
[self event];
@ -353,6 +380,7 @@
[event location], @"location",
[event comment], @"description",
nil];
[result appendContentString: [data jsonRepresentation]];
[startDate release];