mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-07 22:38:51 +00:00
Monotone-Parent: f5fee3205e018e405a45dbec6c9889f91ceb2eb2
Monotone-Revision: 927401b4ee5f346c42cc85dd63cd0389c175c226 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-01-16T19:52:43 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
2008-01-16 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/SOGoCache.m ([SOGoCache
|
||||
-registerObject:objectwithName:nameinContainer:container]):
|
||||
register the object and its parents too.
|
||||
|
||||
* SoObjects/SOGo/SOGoUser.m ([SOGoUser
|
||||
+userWithLogin:newLoginroles:newRoles]): try to retrieve the
|
||||
specified user from the SOGoCache.
|
||||
|
||||
@@ -92,11 +92,20 @@ static SOGoCache *sharedCache = nil;
|
||||
{
|
||||
NSString *fullPath;
|
||||
|
||||
if (object)
|
||||
if (object && name)
|
||||
{
|
||||
[self registerObject: container
|
||||
withName: [container nameInContainer]
|
||||
inContainer: [container container]];
|
||||
fullPath = [self _pathFromObject: container
|
||||
withName: name];
|
||||
[cache setObject: object forKey: fullPath];
|
||||
if (![cache objectForKey: fullPath])
|
||||
{
|
||||
// NSLog (@"registering '%@'", fullPath);
|
||||
[cache setObject: object forKey: fullPath];
|
||||
}
|
||||
// else
|
||||
// NSLog (@"'%@' already registered", fullPath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,18 +118,20 @@ static SOGoCache *sharedCache = nil;
|
||||
withName: name];
|
||||
|
||||
return [cache objectForKey: fullPath];
|
||||
// if (object)
|
||||
// NSLog (@"found cached object '%@'", fullPath);
|
||||
}
|
||||
|
||||
- (void) registerUser: (SOGoUser *) user
|
||||
{
|
||||
NSLog (@"registerUser: %@", user);
|
||||
// NSLog (@"registerUser: %@", user);
|
||||
|
||||
[users setObject: user forKey: [user login]];
|
||||
}
|
||||
|
||||
- (id) userNamed: (NSString *) name
|
||||
{
|
||||
NSLog (@"userNamed: %@", name);
|
||||
// NSLog (@"userNamed: %@", name);
|
||||
|
||||
return [users objectForKey: name];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user