/* fetching */
+- (NSArray *)fetchFields:(NSArray *)_fields
+ fromFolder:(OCSFolder *)_folder
+ from:(NSCalendarDate *)_startDate
+ to:(NSCalendarDate *)_endDate;
+
- (NSArray *)fetchCoreInfosFromFolder:(OCSFolder *)_folder
from:(NSCalendarDate *)_startDate
to:(NSCalendarDate *)_endDate;
return ma;
}
-- (NSArray *)fetchCoreInfosFromFolder:(OCSFolder *)_folder
+- (NSArray *)fetchFields:(NSArray *)_fields
+ fromFolder:(OCSFolder *)_folder
from:(NSCalendarDate *)_startDate
to:(NSCalendarDate *)_endDate
{
(unsigned int)[_endDate timeIntervalSince1970],
(unsigned int)[_startDate timeIntervalSince1970]];
qualifier = [EOQualifier qualifierWithQualifierFormat:sql];
-
- fields = [NSArray arrayWithObjects:
- @"uid", @"startdate", @"enddate",
- @"title", @"participants", @"location", @"isallday",
- @"iscycle", @"partmails", @"sequence", @"ispublic",
- @"isopaque", @"status", @"orgmail",
- nil];
-
- records = [_folder fetchFields:fields matchingQualifier:qualifier];
+
+ records = [_folder fetchFields:_fields matchingQualifier:qualifier];
if (records == nil) {
[self errorWithFormat:@"(%s): fetch failed!", __PRETTY_FUNCTION__];
return nil;
return records;
}
+- (NSArray *)fetchCoreInfosFromFolder:(OCSFolder *)_folder
+ from:(NSCalendarDate *)_startDate
+ to:(NSCalendarDate *)_endDate
+{
+ static NSArray *coreInfos = nil;
+ if(!coreInfos) {
+ coreInfos = [[NSArray arrayWithObjects:@"uid", @"startdate", @"enddate",
+ @"title", @"participants",
+ @"location", @"isallday",
+ @"iscycle", @"partmails",
+ @"sequence", @"ispublic",
+ @"isopaque", @"status", @"orgmail",
+ nil] retain];
+ }
+ return [self fetchInfos:coreInfos
+ fromFolder:_folder
+ from:_startDate
+ to:_endDate];
+}
+
- (NSArray *)fetchCoreInfosFrom:(NSCalendarDate *)_startDate
to:(NSCalendarDate *)_endDate
{
NSString *uid;
person = [_persons objectAtIndex:i];
- email = [person email];
+ email = [person rfc822Email];
if ([email isNotNull]) {
- if ([email hasPrefix:@"mailto:"])
- email = [email substringFromIndex:7];
uid = [um getUIDForEmail:email];
}
else
/* add organizer */
- email = [[_apt organizer] email];
+ email = [[_apt organizer] rfc822Email];
if ([email isNotNull]) {
uid = [um getUIDForEmail:email];
if ([uid isNotNull]) {
- if ([uid hasPrefix:@"mailto:"])
- uid = [uid substringFromIndex:7];
[uids addObject:uid];
}
else
iCalPerson *person;
person = [attendees objectAtIndex:i];
- email = [person email];
+ email = [person rfc822Email];
if (![email isNotNull]) continue;
uid = [um getUIDForEmail:email];
[self logWithFormat:@"Note: got no uid for email: '%@'", email];
continue;
}
- if ([uid hasPrefix:@"mailto:"])
- uid = [uid substringFromIndex:7];
-
if (![uids containsObject:uid])
[uids addObject:uid];
}
# Version file
-SUBMINOR_VERSION:=17
+SUBMINOR_VERSION:=19
+# v0.9.19 requires NGiCal v4.5.36
# v0.9.13 requires libSOGo v0.9.26
2004-12-13 Marcus Mueller <znek@mulle-kybernetik.com>
+ * v0.9.19
+
+ * Appointments/SOGoAppointmentFolder.[hm]: new method to fetch generic
+ fields (better suited for freebusy), fixed some "mailto:" prefix
+ madness
+
* Appointments/SOGoAppointmentFolder.m: fixed bug in
-uidsFromICalPersons: (v0.9.18)
2004-12-13 Marcus Mueller <znek@mulle-kybernetik.com>
+ * v0.9.101
+
+ * UIxAppointmentProposal.m: removed inclusion of iCalPerson+UIx.h
+
+ * iCalPerson+UIx.[hm]: removed -rfc822EMail (moved to NGiCal), changed
+ implementation of -cnForDisplay (just a cover for -cnWithoutQuotes)
+
* v0.9.100
* UIxAppointmentEditor.m: fixed incorrect redirect location
#include <SoObjects/Appointments/SOGoAppointmentFolder.h>
#include <NGExtensions/NGCalendarDateRange.h>
-#include "iCalPerson+UIx.h"
#include "common.h"
@implementation UIxAppointmentProposal
# $Id$
-SUBMINOR_VERSION:=100
+SUBMINOR_VERSION:=101
+# v0.9.101 requires NGiCal v4.5.36
# v0.9.100 requires SOGoUI v0.9.21
# v0.9.99 requires SOGoUI v0.9.20
# v0.9.98 requires SOGoUI v0.9.19
@class NSString;
@interface iCalPerson(Convenience)
-- (NSString *)rfc822Email;
- (NSString *)cnForDisplay;
@end
@implementation iCalPerson(Convenience)
-- (NSString *)rfc822Email {
- NSString *_email;
- NSRange colon;
-
- _email = [self email];
- colon = [_email rangeOfString:@":"];
-
- if (colon.length > 0)
- return [_email substringFromIndex:(colon.location + colon.length)];
-
- return _email;
-}
-
- (NSString *)cnForDisplay {
- /* remove quotes around a CN */
- NSString *_cn;
-
- _cn = [self cn];
- 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)];
+ return [self cnWithoutQuotes];
}
@end /* iCalPerson(Convenience) */
2004-12-13 Marcus Mueller <znek@mulle-kybernetik.com>
+ * SOGoAppointment.m: removed UIx_Privates declaration (no longer
+ necessary) (v0.9.31)
+
* SOGoUserManager.m: added comment regarding mapping uid <->mail
(v0.9.30)
#include "SOGoAppointmentICalRenderer.h"
#include "common.h"
-@interface iCalPerson(UIx_Privates)
-- (NSString *)rfc822Email;
-@end
-
@interface SOGoAppointment (PrivateAPI)
- (NSArray *)_filteredAttendeesThinkingOfPersons:(BOOL)_persons;
@end
# Version file
-SUBMINOR_VERSION:=30
+SUBMINOR_VERSION:=31
+# v0.9.31 requires NGiCal v4.5.36
# v0.9.26 requires NGExtensions v4.5.136
# v0.9.23 requires NGiCal v4.3.32
# v0.9.18 requires NGExtensions v4.3.123