Monotone-Parent: ff201d8484b08d9e29b03401dc626b86400b923a

Monotone-Revision: 46d42d040199ad6d8849025055fba6fdf50d9455

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-01-24T17:11:29
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2008-01-24 17:11:29 +00:00
parent 7a7c75e240
commit ceab91527b
2 changed files with 19 additions and 3 deletions
+7
View File
@@ -1,5 +1,12 @@
2008-01-24 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/SOGoUser.m ([SOGoUser
+userWithLogin:newLoginroles:newRoles]): test if the user is well
initialized before registering it with the SOGo cache.
([SOGoUser -initWithLogin:newLoginroles:newRoles]): returns a user
only if the realUID has been found, otherwise we dealloc self and
return nil.
* SoObjects/Appointments/SOGoAppointmentFolder.m: if c_cycleinfo
is an NSNull instance, we consider it to be empty and return
automatically with an error message in the log.
+12 -3
View File
@@ -133,8 +133,11 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
if (!user)
{
user = [[self alloc] initWithLogin: newLogin roles: newRoles];
[user autorelease];
[cache registerUser: user];
if (user)
{
[user autorelease];
[cache registerUser: user];
}
}
[user setPrimaryRoles: newRoles];
@@ -173,7 +176,13 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
realUID = [[um contactInfosForUserWithUIDorEmail: newLogin]
objectForKey: @"c_uid"];
}
self = [super initWithLogin: realUID roles: newRoles];
if (realUID)
self = [super initWithLogin: realUID roles: newRoles];
else
{
[self release];
self = nil;
}
return self;
}