Monotone-Parent: e44e3640213c46f7a069d1612037b80c15c40ea7

Monotone-Revision: 96d751786922d33162cb95008bfb6f6460b05db4

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-03-21T00:37:22
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau 2011-03-21 00:37:22 +00:00
parent 66e53da063
commit 071bdd863f
2 changed files with 44 additions and 28 deletions

View file

@ -1,3 +1,9 @@
2011-03-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Scheduler/UIxComponentEditor.m
(-takeValuesFromRequest:inContext:): added some sanity checks to
avoid crashes when alarm data is not properly entered.
2011-03-18 Francis Lachapelle <flachapelle@inverse.ca> 2011-03-18 Francis Lachapelle <flachapelle@inverse.ca>
* UI/WebServerResources/SchedulerUI.js (initCalendars): we must * UI/WebServerResources/SchedulerUI.js (initCalendars): we must

View file

@ -2150,6 +2150,8 @@ RANGE(2);
} }
else { else {
// Custom alarm // Custom alarm
if ([reminderAction length] > 0 && [reminderUnit length] > 0)
{
[anAlarm setAction: [reminderAction uppercaseString]]; [anAlarm setAction: [reminderAction uppercaseString]];
if ([reminderAction isEqualToString: @"email"]) if ([reminderAction isEqualToString: @"email"])
{ {
@ -2178,11 +2180,19 @@ RANGE(2);
[aTrigger setValue: aValue]; [aTrigger setValue: aValue];
[aTrigger setRelationType: reminderRelation]; [aTrigger setRelationType: reminderRelation];
} }
else
{
[anAlarm release];
anAlarm = nil;
}
}
if (anAlarm)
{
[component removeAllAlarms]; [component removeAllAlarms];
[component addToAlarms: anAlarm]; [component addToAlarms: anAlarm];
[anAlarm release]; [anAlarm release];
} }
}
if (![self isChildOccurence]) if (![self isChildOccurence])
{ {