aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPExportFilenameUtilities.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-01-22 12:19:21 +0000
committerstuconnolly <stuart02@gmail.com>2012-01-22 12:19:21 +0000
commit1d7ed99d602bf9c7aa4ea40a9a2ab6458864e51f (patch)
tree6c08ad29618ea02caf302180706d010c90cd57e0 /Source/SPExportFilenameUtilities.m
parente23ba5155a53c43a106ac9646f51321ccc7d86f4 (diff)
downloadsequelpro-1d7ed99d602bf9c7aa4ea40a9a2ab6458864e51f.tar.gz
sequelpro-1d7ed99d602bf9c7aa4ea40a9a2ab6458864e51f.tar.bz2
sequelpro-1d7ed99d602bf9c7aa4ea40a9a2ab6458864e51f.zip
Bring outlinew view branch up to date with trunk (r3375:3468).
Diffstat (limited to 'Source/SPExportFilenameUtilities.m')
-rw-r--r--Source/SPExportFilenameUtilities.m28
1 files changed, 19 insertions, 9 deletions
diff --git a/Source/SPExportFilenameUtilities.m b/Source/SPExportFilenameUtilities.m
index a4330e36..31625a4c 100644
--- a/Source/SPExportFilenameUtilities.m
+++ b/Source/SPExportFilenameUtilities.m
@@ -219,40 +219,50 @@
// Walk through the token field, appending token replacements or strings
NSArray *representedFilenameParts = [exportCustomFilenameTokenField objectValue];
- for (id filenamePart in representedFilenameParts) {
+
+ for (id filenamePart in representedFilenameParts)
+ {
if ([filenamePart isKindOfClass:[SPExportFileNameTokenObject class]]) {
NSString *tokenContent = [filenamePart tokenContent];
if ([tokenContent isEqualToString:NSLocalizedString(@"host", @"export filename host token")]) {
[string appendString:[tableDocumentInstance host]];
- } else if ([tokenContent isEqualToString:NSLocalizedString(@"database", @"export filename database token")]) {
+ }
+ else if ([tokenContent isEqualToString:NSLocalizedString(@"database", @"export filename database token")]) {
[string appendString:[tableDocumentInstance database]];
- } else if ([tokenContent isEqualToString:NSLocalizedString(@"table", @"table")]) {
+ }
+ else if ([tokenContent isEqualToString:NSLocalizedString(@"table", @"table")]) {
[string appendString:(table) ? table : @""];
- } else if ([tokenContent isEqualToString:NSLocalizedString(@"date", @"export filename date token")]) {
+ }
+ else if ([tokenContent isEqualToString:NSLocalizedString(@"date", @"export filename date token")]) {
[dateFormatter setDateStyle:NSDateFormatterShortStyle];
[dateFormatter setTimeStyle:NSDateFormatterNoStyle];
[string appendString:[dateFormatter stringFromDate:[NSDate date]]];
- } else if ([tokenContent isEqualToString:NSLocalizedString(@"year", @"export filename date token")]) {
+ }
+ else if ([tokenContent isEqualToString:NSLocalizedString(@"year", @"export filename date token")]) {
[string appendString:[[NSDate date] descriptionWithCalendarFormat:@"%Y" timeZone:nil locale:nil]];
- } else if ([tokenContent isEqualToString:NSLocalizedString(@"month", @"export filename date token")]) {
+ }
+ else if ([tokenContent isEqualToString:NSLocalizedString(@"month", @"export filename date token")]) {
[string appendString:[[NSDate date] descriptionWithCalendarFormat:@"%m" timeZone:nil locale:nil]];
- } else if ([tokenContent isEqualToString:NSLocalizedString(@"day", @"export filename date token")]) {
+ }
+ else if ([tokenContent isEqualToString:NSLocalizedString(@"day", @"export filename date token")]) {
[string appendString:[[NSDate date] descriptionWithCalendarFormat:@"%d" timeZone:nil locale:nil]];
- } else if ([tokenContent isEqualToString:NSLocalizedString(@"time", @"export filename time token")]) {
+ }
+ else if ([tokenContent isEqualToString:NSLocalizedString(@"time", @"export filename time token")]) {
[dateFormatter setDateStyle:NSDateFormatterNoStyle];
[dateFormatter setTimeStyle:NSDateFormatterShortStyle];
[string appendString:[dateFormatter stringFromDate:[NSDate date]]];
}
- } else {
+ }
+ else {
[string appendString:filenamePart];
}
}