Monotone-Parent: 7b6ad79fde0791f201e8b98eb957ded1410de5c1

Monotone-Revision: 7576485920bab942eaccc45f2ab5b1914255643d

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-04-20T21:30:17
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2010-04-20 21:30:17 +00:00
parent 769979d8d5
commit b7067eec65
25 changed files with 68 additions and 59 deletions
+7 -6
View File
@@ -156,13 +156,13 @@ static NSArray *childRecordFields = nil;
id newFolder;
NSArray *elements, *pathElements;
NSString *path, *objectPath, *login, *currentUser, *ocsName, *folderName;
WOContext *context;
BOOL isSubscription;
WOContext *localContext;
BOOL localIsSubscription;
elements = [reference componentsSeparatedByString: @":"];
login = [elements objectAtIndex: 0];
context = [[WOApplication application] context];
currentUser = [[context activeUser] login];
localContext = [[WOApplication application] context];
currentUser = [[localContext activeUser] login];
objectPath = [elements objectAtIndex: 1];
pathElements = [objectPath componentsSeparatedByString: @"/"];
if ([pathElements count] > 1)
@@ -177,8 +177,9 @@ static NSArray *childRecordFields = nil;
newFolder = [self objectWithName: folderName inContainer: aContainer];
[newFolder setOCSPath: path];
[newFolder setOwner: login];
isSubscription = ![login isEqualToString: [aContainer ownerInContext: context]];
[newFolder setIsSubscription: isSubscription];
localIsSubscription = ![login isEqualToString:
[aContainer ownerInContext: localContext]];
[newFolder setIsSubscription: localIsSubscription];
if (![newFolder displayName])
newFolder = nil;