Permalink
Browse files

Fix table name token not being used in SQL exports even when only one…

… table is selected
  • Loading branch information...
dmoagx committed Oct 24, 2015
1 parent 6f82431 commit e7cf9cde835a3db7921a96da063b908c0084a43f
Showing with 4 additions and 1 deletion.
  1. +2 −0 Source/SPExportFilenameUtilities.m
  2. +2 −1 Source/SPExportInitializer.m
@@ -149,6 +149,8 @@ - (void)updateAvailableExportFilenameTokens
}
[exportCustomFilenameTokenPool setObjectValue:exportTokens];
//update preview name as programmatically changing the exportCustomFilenameTokenField does not fire a notification
[self updateDisplayedExportFilename];
}
/**
@@ -304,7 +304,8 @@ - (void)exportTables:(NSArray *)exportTables orDataArray:(NSArray *)dataArray
[sqlExporter setSqlExportTables:exportTables];
// Create custom filename if required
[exportFilename setString:(createCustomFilename) ? [self expandCustomFilenameFormatUsingTableName:nil] : [self generateDefaultExportFilename]];
NSString *selectedTableName = (exportSource == SPTableExport && [exportTables count] == 1)? [[exportTables objectAtIndex:0] objectAtIndex:0] : nil;
[exportFilename setString:(createCustomFilename) ? [self expandCustomFilenameFormatUsingTableName:selectedTableName] : [self generateDefaultExportFilename]];
// Only append the extension if necessary
if (![[exportFilename pathExtension] length]) {

0 comments on commit e7cf9cd

Please sign in to comment.