aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPExportFilenameUtilities.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2011-08-24 19:54:29 +0000
committerstuconnolly <stuart02@gmail.com>2011-08-24 19:54:29 +0000
commit4f9debeff37605793552f7fe8c3d3f1e5b4c58e2 (patch)
tree71a38f1885e576e77a4b2e2ebd05ef7992cfc12f /Source/SPExportFilenameUtilities.m
parent44aecf82db1ae3fe76f16f3f92ae580130713e0e (diff)
downloadsequelpro-4f9debeff37605793552f7fe8c3d3f1e5b4c58e2.tar.gz
sequelpro-4f9debeff37605793552f7fe8c3d3f1e5b4c58e2.tar.bz2
sequelpro-4f9debeff37605793552f7fe8c3d3f1e5b4c58e2.zip
Tidy up.
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];
}
}