Permalink
Browse files

Minor bug: CSV/XML export file names could behave differently for loc…

…alized versions vs English version
  • Loading branch information...
dmoagx committed May 25, 2017
1 parent c1930af commit bdde7f922ee90a6a01cf23002bc4e29d0cd7367d
Showing with 2 additions and 2 deletions.
  1. +2 −2 Source/SPExportInitializer.m
@@ -520,7 +520,7 @@ - (SPCSVExporter *)initializeCSVExporterForTable:(NSString *)table orDataArray:(
BOOL tableNameInTokens = NO;
NSArray *representedObjects = [exportCustomFilenameTokenField objectValue];
for (id representedObject in representedObjects) {
if ([representedObject isKindOfClass:[SPExportFileNameTokenObject class]] && [[representedObject tokenId] isEqualToString:NSLocalizedString(@"table", @"table")]) tableNameInTokens = YES;
if ([representedObject isKindOfClass:[SPExportFileNameTokenObject class]] && [[representedObject tokenId] isEqualToString:SPFileNameTableTokenName]) tableNameInTokens = YES;
}
[exportFilename setString:(tableNameInTokens ? exportFilename : [exportFilename stringByAppendingFormat:@"_%@", table])];
}
@@ -582,7 +582,7 @@ - (SPXMLExporter *)initializeXMLExporterForTable:(NSString *)table orDataArray:(
BOOL tableNameInTokens = NO;
NSArray *representedObjects = [exportCustomFilenameTokenField objectValue];
for (id representedObject in representedObjects) {
if ([representedObject isKindOfClass:[SPExportFileNameTokenObject class]] && [[representedObject tokenId] isEqualToString:NSLocalizedString(@"table", @"table")]) tableNameInTokens = YES;
if ([representedObject isKindOfClass:[SPExportFileNameTokenObject class]] && [[representedObject tokenId] isEqualToString:SPFileNameTableTokenName]) tableNameInTokens = YES;
}
[exportFilename setString:(tableNameInTokens ? exportFilename : [exportFilename stringByAppendingFormat:@"_%@", table])];
}

0 comments on commit bdde7f9

Please sign in to comment.