+2005-07-12 Marcus Mueller <znek@mulle-kybernetik.com>
+
+ * SOGoAppointmentObject.m: tries ambitiously to detect the baseURL in
+ -homePageURLForPerson: now. This code doesn't really belong here
+ but currently there's no appropriate controller for dealing with it
+ around. Also removed mail notification testing code. (v0.9.40)
+
2005-07-12 Helge Hess <helge.hess@opengroupware.org>
* fixed compilation (v0.9.39)
NSString *uid;
if (!um) {
- um = [[AgenorUserManager sharedUserManager] retain];
- baseURL = @"http://agenor.opengroupware.org/foo/so";
+ WOContext *ctx;
+ NSArray *traversalObjects;
+
+ um = [[AgenorUserManager sharedUserManager] retain];
+
+ /* generate URL from traversal stack */
+ ctx = [[WOApplication application] context];
+ traversalObjects = [ctx objectTraversalStack];
+ if ([traversalObjects count] >= 1) {
+ baseURL = [[[traversalObjects objectAtIndex:0] baseURLInContext:ctx]
+ retain];
+ }
+ else {
+ [self warnWithFormat:@"Unable to create baseURL from context!"];
+ baseURL = @"http://localhost/";
+ }
}
uid = [um getUIDForEmail:[_person rfc822Email]];
if (!uid) return nil;
- return [NSString stringWithFormat:@"%@/%@", baseURL, uid];
+ return [NSString stringWithFormat:@"%@%@", baseURL, uid];
}
- (NSTimeZone *)viewTimeZoneForPerson:(iCalPerson *)_person {
attendee = [_attendees objectAtIndex:i];
/* construct recipient */
-#if 1
cn = [attendee cn];
if (cn) {
recipient = [NSString stringWithFormat:@"%@ <%@>",
else {
recipient = [attendee rfc822Email];
}
-#else
- recipient = @"Marcus Mueller <mm@skyrix.com>";
-#endif
/* construct message content */
p = [app pageWithName:pageName];
[body release];
/* send the damn thing */
-#if 1
[sendmail sendMimePart:msg
toRecipients:[NSArray arrayWithObject:[attendee rfc822Email]]
sender:[organizer rfc822Email]];
-#else
- [sendmail sendMimePart:msg
- toRecipients:[NSArray arrayWithObject:@"mm@skyrix.com"]
- sender:[organizer rfc822Email]];
-#endif
}
}