Fix validation of subscribed folders

Fixes #2583
This commit is contained in:
Francis Lachapelle
2014-01-24 13:45:29 -05:00
parent 42a7bcb9ac
commit fc0c580fe1
2 changed files with 5 additions and 4 deletions

1
NEWS
View File

@@ -20,6 +20,7 @@ Enhancements
Bug fixes
- don't load 'background' attribute (#2437)
- fixed validation of subscribed folders (#2583)
2.1.1b (2013-12-04)
-------------------

View File

@@ -278,12 +278,11 @@ static SoSecurityManager *sm = nil;
NSMutableDictionary *folderDisplayNames;
NSMutableArray *subscribedReferences;
SOGoUserSettings *settings;
NSEnumerator *allKeys;
NSString *currentKey;
SOGoUser *ownerUser;
NSException *error;
id o;
int i;
BOOL dirty;
error = nil; /* we ignore non-DB errors at this time... */
@@ -300,9 +299,9 @@ static SoSecurityManager *sm = nil;
else
folderDisplayNames = nil;
allKeys = [subscribedReferences objectEnumerator];
while ((currentKey = [allKeys nextObject]))
for (i = [subscribedReferences count] - 1; i >= 0; i--)
{
currentKey = [subscribedReferences objectAtIndex: i];
if (![self _appendSubscribedSource: currentKey])
{
// We no longer have access to this subscription, let's
@@ -322,6 +321,7 @@ static SoSecurityManager *sm = nil;
if (folderDisplayNames)
[[settings objectForKey: nameInContainer] setObject: folderDisplayNames
forKey: @"FolderDisplayNames"];
[settings synchronize];
}
return error;