From: znek Date: Mon, 13 Dec 2004 17:13:42 +0000 (+0000) Subject: minor formatting fixes, bug fixes for new appointment creation X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4d61600a41b16afed42236af0633711d9b97a57;p=scalable-opengroupware.org minor formatting fixes, bug fixes for new appointment creation git-svn-id: http://svn.opengroupware.org/SOGo/trunk@473 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/SoObjects/Appointments/SOGoAppointmentFolder.m b/SOGo/SoObjects/Appointments/SOGoAppointmentFolder.m index 7303ffe0..bf25ca24 100644 --- a/SOGo/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SOGo/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -312,11 +312,11 @@ static NSTimeZone *MET = nil; /* Note: can return NSNull objects in the array! */ NSMutableArray *uids; AgenorUserManager *um; - unsigned i, count; + unsigned i, count; if (_persons == nil) return nil; - + count = [_persons count]; uids = [NSMutableArray arrayWithCapacity:count + 1]; um = [AgenorUserManager sharedUserManager]; @@ -329,11 +329,9 @@ static NSTimeZone *MET = nil; person = [_persons objectAtIndex:i]; email = [person email]; if ([email isNotNull]) { + if ([email hasPrefix:@"mailto:"]) + email = [uid substringFromIndex:7]; uid = [um getUIDForEmail:email]; - if ([uid isNotNull]) { - if ([uid hasPrefix:@"mailto:"]) - uid = [uid substringFromIndex:7]; - } } else uid = nil; diff --git a/SOGo/SoObjects/ChangeLog b/SOGo/SoObjects/ChangeLog index be5d8352..0fccfece 100644 --- a/SOGo/SoObjects/ChangeLog +++ b/SOGo/SoObjects/ChangeLog @@ -1,3 +1,8 @@ +2004-12-13 Marcus Mueller + + * Appointments/SOGoAppointmentFolder.m: fixed bug in + -uidsFromICalPersons: (v0.9.18) + 2004-12-10 Marcus Mueller * Appointments/SOGoAppointmentFolder.m: added new quickinfo attributes diff --git a/SOGo/UI/SOGoUI/ChangeLog b/SOGo/UI/SOGoUI/ChangeLog index f0618c57..f220d322 100644 --- a/SOGo/UI/SOGoUI/ChangeLog +++ b/SOGo/UI/SOGoUI/ChangeLog @@ -1,5 +1,7 @@ 2004-12-13 Marcus Mueller + * SOGoAptFormatter.[hm]: new option for formatter (v0.9.21) + * SOGoAptFormatter.[hm]: added ability to set custom title for private appointments. (v0.9.20) diff --git a/SOGo/UI/SOGoUI/SOGoAptFormatter.h b/SOGo/UI/SOGoUI/SOGoAptFormatter.h index 2c815b8b..e4c0202a 100644 --- a/SOGo/UI/SOGoUI/SOGoAptFormatter.h +++ b/SOGo/UI/SOGoUI/SOGoAptFormatter.h @@ -44,6 +44,7 @@ - (void)setPrivateTooltip; - (void)setPrivateDetails; +- (void)setPrivateTitleOnly; - (void)setPrivateSuppressAll; - (void)setPrivateTitle:(NSString *)_privateTitle; diff --git a/SOGo/UI/SOGoUI/SOGoAptFormatter.m b/SOGo/UI/SOGoUI/SOGoAptFormatter.m index 9bcc4467..0694429a 100644 --- a/SOGo/UI/SOGoUI/SOGoAptFormatter.m +++ b/SOGo/UI/SOGoUI/SOGoAptFormatter.m @@ -76,6 +76,10 @@ self->formatAction = @selector(suppressApt:); } +- (void)setPrivateTitleOnly { + self->formatAction = @selector(titleOnlyForPrivateApt:); +} + - (void)setPrivateTitle:(NSString *)_privateTitle { ASSIGN(self->privateTitle, _privateTitle); } @@ -157,6 +161,15 @@ return aptDescr; } +- (NSString *)titleOnlyForPrivateApt:(id)_apt { + NSString *s; + + s = [self privateTitle]; + if(!s) + return @""; + return s; +} + - (NSString *)tooltipForApt:(id)_apt { NSCalendarDate *startDate, *endDate; NSMutableString *aptDescr; diff --git a/SOGo/UI/SOGoUI/Version b/SOGo/UI/SOGoUI/Version index b735e6e0..c0af8cd7 100644 --- a/SOGo/UI/SOGoUI/Version +++ b/SOGo/UI/SOGoUI/Version @@ -1,5 +1,5 @@ # $Id$ -SUBMINOR_VERSION:=20 +SUBMINOR_VERSION:=21 # v0.9.18 requires NGExtensions v4.5.136 diff --git a/SOGo/UI/Scheduler/ChangeLog b/SOGo/UI/Scheduler/ChangeLog index 38a87aa9..b507aef1 100644 --- a/SOGo/UI/Scheduler/ChangeLog +++ b/SOGo/UI/Scheduler/ChangeLog @@ -1,5 +1,12 @@ 2004-12-13 Marcus Mueller + * v0.9.100 + + * UIxAppointmentEditor.m: fixed incorrect redirect location + + * UIxCalWeekListview.m, UIxCalWeekChartview.m: use new formatter option + to correctly format private appointments + * v0.9.99 * {English,French}.lproj/default.strings: new label diff --git a/SOGo/UI/Scheduler/UIxAppointmentEditor.m b/SOGo/UI/Scheduler/UIxAppointmentEditor.m index 86993d5e..cb7bb3b3 100644 --- a/SOGo/UI/Scheduler/UIxAppointmentEditor.m +++ b/SOGo/UI/Scheduler/UIxAppointmentEditor.m @@ -428,7 +428,7 @@ Note: 'clientObject' is the SOGoAppointmentFolder! Update: remember that there are group folders as well. */ - NSString *uri, *objectId, *nextMethod; + NSString *uri, *objectId, *method; objectId = [NSClassFromString(@"SOGoAppointmentFolder") globallyUniqueObjectId]; @@ -436,9 +436,11 @@ return [NSException exceptionWithHTTPStatus:500 /* Internal Error */ reason:@"could not create a unique ID"]; } - - nextMethod = [NSString stringWithFormat:@"../%@/edit", objectId]; - uri = [self _completeURIForMethod:nextMethod]; + + method = [NSString stringWithFormat:@"Calendar/%@/edit", objectId]; + method = [[self userFolderPath] stringByAppendingPathComponent:method]; + + uri = [self completeHrefForMethod:method]; return [self redirectToLocation:uri]; } diff --git a/SOGo/UI/Scheduler/UIxCalWeekChartview.m b/SOGo/UI/Scheduler/UIxCalWeekChartview.m index 434a0a0e..f74e4f63 100644 --- a/SOGo/UI/Scheduler/UIxCalWeekChartview.m +++ b/SOGo/UI/Scheduler/UIxCalWeekChartview.m @@ -166,7 +166,7 @@ of the current column (currentDay is set to be this date) */ - (void)configureFormatters { [super configureFormatters]; [self->aptFormatter setTitleOnly]; - [self->privateAptFormatter setPrivateDetails]; + [self->privateAptFormatter setPrivateTitleOnly]; } diff --git a/SOGo/UI/Scheduler/UIxCalWeekListview.m b/SOGo/UI/Scheduler/UIxCalWeekListview.m index a4dbce92..e4839aaf 100644 --- a/SOGo/UI/Scheduler/UIxCalWeekListview.m +++ b/SOGo/UI/Scheduler/UIxCalWeekListview.m @@ -144,7 +144,7 @@ - (void)configureFormatters { [super configureFormatters]; [self->aptFormatter setTitleOnly]; - [self->privateAptFormatter setPrivateDetails]; + [self->privateAptFormatter setPrivateTitleOnly]; } - (NSString *)cnForCurrentUid { diff --git a/SOGo/UI/Scheduler/Version b/SOGo/UI/Scheduler/Version index e258872b..d202ae61 100644 --- a/SOGo/UI/Scheduler/Version +++ b/SOGo/UI/Scheduler/Version @@ -1,15 +1,16 @@ # $Id$ -SUBMINOR_VERSION:=99 +SUBMINOR_VERSION:=100 -# v0.9.99 requires SOGoUI v0.9.20 -# v0.9.98 requires SOGoUI v0.9.19 -# v0.9.96 requires SOGoLogic v0.9.27 -# v0.9.94 requires NGExtensions v4.5.136 -# v0.9.84 requires SOGoLogic v0.9.12 -# v0.9.70 requires NGExtensions v4.3.107 -# v0.9.67 requires SOPE v4.3 -# v0.9.61 requires NGExtensions v4.2.102 -# v0.9.41 requires NGObjWeb v4.2.431 -# v0.9.31 requires WEExtensions v4.2.52 -# v0.9.29 requires WEExtensions v4.2.51 +# v0.9.100 requires SOGoUI v0.9.21 +# v0.9.99 requires SOGoUI v0.9.20 +# v0.9.98 requires SOGoUI v0.9.19 +# v0.9.96 requires SOGoLogic v0.9.27 +# v0.9.94 requires NGExtensions v4.5.136 +# v0.9.84 requires SOGoLogic v0.9.12 +# v0.9.70 requires NGExtensions v4.3.107 +# v0.9.67 requires SOPE v4.3 +# v0.9.61 requires NGExtensions v4.2.102 +# v0.9.41 requires NGObjWeb v4.2.431 +# v0.9.31 requires WEExtensions v4.2.52 +# v0.9.29 requires WEExtensions v4.2.51 diff --git a/SOGoLogic/AgenorUserManager.m b/SOGoLogic/AgenorUserManager.m index 94d1b91d..06f7c491 100644 --- a/SOGoLogic/AgenorUserManager.m +++ b/SOGoLogic/AgenorUserManager.m @@ -110,6 +110,27 @@ static NSString *ldapBaseDN = nil; } +/* + The uid field is in bijection this the email adress : + this field can be construct from the email. Email are uniques. + + So, we can use email adresse from identifier. + The field is made like this : + _ if the email is equipement.gouv.fr then the login + is the part before the @ + for example : fisrtName.lastName + _ if the email is not equipement.gouv.fr then the login + is the full email adress where @ is change to . (dot) + for example : fisrtName.lastName.subDomain.domain.tld + + NOTE: mapping email -> uid is easy, but can also generate uid's not known + to the system (i.e. for private addressbook entries, obvious). + The reverse mapping can work _only_ if "firstName.lastname." is + guaranteed, because the second dot would be mapped to '@'. This + is probably error prone. + Only LDAP fetches would guarantee correctness in both cases. +*/ + - (NSString *)getUIDForEmail:(NSString *)_email { NSRange r; NSString *domain; diff --git a/SOGoLogic/ChangeLog b/SOGoLogic/ChangeLog index f5f154dd..9c9b89b2 100644 --- a/SOGoLogic/ChangeLog +++ b/SOGoLogic/ChangeLog @@ -1,3 +1,8 @@ +2004-12-13 Marcus Mueller + + * SOGoUserManager.m: added comment regarding mapping uid <->mail + (v0.9.30) + 2004-12-10 Marcus Mueller * SOGoAppointment.[hm]: added -isPublic and -isTransparent as diff --git a/SOGoLogic/Version b/SOGoLogic/Version index 81935be8..3a959fbe 100644 --- a/SOGoLogic/Version +++ b/SOGoLogic/Version @@ -1,6 +1,6 @@ # Version file -SUBMINOR_VERSION:=29 +SUBMINOR_VERSION:=30 # v0.9.26 requires NGExtensions v4.5.136 # v0.9.23 requires NGiCal v4.3.32