Revert "(fix) we now load 'base products' before any other ones"

This reverts commit 3157fa022e.
pull/207/head
Ludovic Marcotte 2016-05-04 09:28:25 -04:00
parent 031e2d4836
commit 54b114712f
1 changed files with 2 additions and 17 deletions

View File

@ -30,13 +30,11 @@
#import "SOGoProductLoader.h"
static NSString *productDirectoryName = @"SOGo";
static NSArray *baseProducts;
@implementation SOGoProductLoader
+ (id) productLoader
{
baseProducts = [[NSArray alloc] initWithObjects: @"Appointments.SOGo", @"Contacts.SOGo", @"Mailer.SOGo", @"CommonUI.SOGo", @"MainUI.SOGo", nil];
return [[self new] autorelease];
}
@ -107,7 +105,7 @@ static NSArray *baseProducts;
{
SoProductRegistry *registry = nil;
NSFileManager *fm;
NSMutableArray *loadedProducts, *remainingProducts;
NSMutableArray *loadedProducts;
NSEnumerator *pathes;
NSString *lpath, *bpath;
NSEnumerator *productNames;
@ -124,20 +122,7 @@ static NSArray *baseProducts;
pathes = [[self productSearchPathes] objectEnumerator];
while ((lpath = [pathes nextObject]))
{
productNames = [baseProducts objectEnumerator];
while ((productName = [productNames nextObject]))
{
bpath = [lpath stringByAppendingPathComponent: productName];
if ([fm fileExistsAtPath: bpath])
{
[registry registerProductAtPath: bpath];
[loadedProducts addObject: productName];
}
}
remainingProducts = [NSMutableArray arrayWithArray: [fm directoryContentsAtPath: lpath]];
[remainingProducts removeObjectsInArray: baseProducts];
productNames = [remainingProducts objectEnumerator];
productNames = [[fm directoryContentsAtPath: lpath] objectEnumerator];
while ((productName = [productNames nextObject]))
{
if ([[productName pathExtension] isEqualToString: @"SOGo"])