+2004-08-16 Helge Hess <helge.hess@skyrix.com>
+
+ * iCalPerson+UIx.m: fixed -cnForDisplay to properly check for quotes
+ prior removing them (v0.9.52)
+
2004-08-15 Helge Hess <helge.hess@skyrix.com>
* UIxAppointmentEditor.m: fixed for new time fields (v0.9.51)
- (void)saveValuesIntoAppointment:(SOGoAppointment *)_appointment {
/* merge in form values */
- NSArray *attendees, *lResources;
+ NSArray *attendees, *lResources;
-#warning TODO: broken for the new date/time selector!
[_appointment setStartDate:[self aptStartDate]];
[_appointment setEndDate:[self aptEndDate]];
# $Id$
-SUBMINOR_VERSION:=51
+SUBMINOR_VERSION:=52
# v0.9.41 requires libNGObjWeb v4.2.431
# v0.9.31 requires libWEExtensions v4.2.52
}
- (NSString *)cnForDisplay {
-#if 1
-# warning TODO: ask znek what this was good for
- return [self cn];
-#else
+ /* remove quotes around a CN */
NSString *_cn;
- /* Note: this breaks the CN with the new appointment editor */
- /* if this is for quoting, we need to actually check for quotes! */
_cn = [self cn];
- if ([_cn length] > 2)
- return [_cn substringWithRange:NSMakeRange(1, [_cn length] - 2)];
- return _cn;
-#endif
+ if ([_cn length] <= 2)
+ return _cn;
+ if ([_cn characterAtIndex:0] != '"')
+ return _cn;
+ if (![_cn hasSuffix:@"\""])
+ return _cn;
+
+ return [_cn substringWithRange:NSMakeRange(1, [_cn length] - 2)];
}
@end /* iCalPerson(Convenience) */