Show
Ignore:
Timestamp:
08/03/09 08:59:45 (3 years ago)
Author:
gbooker
Message:

Added ability to fetch all the collections which are not skipped instead of all the collections which are not hidden. Importer and Leopard File Events use non-skipped collections instead of non-hidden ones.
Fixes #292

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/CoreData/SapphireFrappliance/MetaData/SapphireMObjects/SapphireCollectionDirectory.m

    r823 r874  
    8585} 
    8686 
    87 + (NSArray *)availableCollectionDirectoriesInContext:(NSManagedObjectContext *)moc 
     87+ (NSArray *)availableCollectionDirectoriesInContext:(NSManagedObjectContext *)moc includeHiddenOverSkipped:(BOOL)hidden 
    8888{ 
    8989        NSFileManager *fm = [NSFileManager defaultManager]; 
     
    130130        } 
    131131         
    132         NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(hidden == NO) AND ((manualCollection == YES) OR (directory.path IN %@))", colSet]; 
     132        NSPredicate *predicate; 
     133        if(hidden) 
     134                predicate = [NSPredicate predicateWithFormat:@"(skip == NO) AND ((manualCollection == YES) OR (directory.path IN %@))", colSet]; 
     135        else 
     136                predicate = [NSPredicate predicateWithFormat:@"(hidden == NO) AND ((manualCollection == YES) OR (directory.path IN %@))", colSet]; 
    133137        NSSortDescriptor *sort = [[NSSortDescriptor alloc] initWithKey:@"directory.path" ascending:YES]; 
    134138        NSArray *ret = doSortedFetchRequest(SapphireCollectionDirectoryName, moc, predicate, sort);