diff --git a/ChangeLog b/ChangeLog index b6d2dfd66..6f3a231ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-02-18 Wolfgang Sourdeau + * Tools/SOGoToolRestore.m (+initialize): removed method. + (-run): make use of the newly publicized SOGoProductLoader for + loading needed products. + * SoObjects/SOGo/SOGoProductLoader.m (-loadAllProducts): new name for "loadProducts". Do not list product directories where no products were loaded. diff --git a/Tools/SOGoToolRestore.m b/Tools/SOGoToolRestore.m index e7edaf09f..2cc24a953 100644 --- a/Tools/SOGoToolRestore.m +++ b/Tools/SOGoToolRestore.m @@ -34,10 +34,11 @@ #import #import -#import #import +#import #import #import +#import #import #import @@ -54,20 +55,6 @@ @implementation SOGoToolRestore -+ (void) initialize -{ - NGBundleManager *bm; - - /* we need to load the SOGo bundles here because OGoContentStore make use of - certain categories found therein */ - bm = [NGBundleManager defaultBundleManager]; - [bm setBundleSearchPaths: [NSArray arrayWithObject: SOGO_LIBDIR]]; - [[bm bundleWithName: @"Appointments" type: @"SOGo"] load]; - [[bm bundleWithName: @"Contacts" type: @"SOGo"] load]; - - [iCalEntityObject initializeSOGoExtensions]; -} - + (NSString *) command { return @"restore"; @@ -591,6 +578,12 @@ - (BOOL) run { + [[SOGoProductLoader productLoader] + loadProducts: [NSArray arrayWithObjects: @"Contacts.SOGo", + @"Appointments.SOGo", + nil]]; + [iCalEntityObject initializeSOGoExtensions]; + return ([self parseArguments] && [self proceed]); }