aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableData.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-01-20 23:51:15 +0000
committerrowanbeentje <rowan@beent.je>2010-01-20 23:51:15 +0000
commita485d370c24cb6378a52c3452dc0cdbadfefd50f (patch)
treef3bb2ded2b5571d860d7677cca509d575ec5ef81 /Source/SPTableData.m
parent38ed0a7356c24b2113e157fbec26004100b5f1e9 (diff)
downloadsequelpro-a485d370c24cb6378a52c3452dc0cdbadfefd50f.tar.gz
sequelpro-a485d370c24cb6378a52c3452dc0cdbadfefd50f.tar.bz2
sequelpro-a485d370c24cb6378a52c3452dc0cdbadfefd50f.zip
Address Issue #546 (format string bugs):
- Fix incorrect uses of [NSString stringWithFormat:] with preconstructed strings and no arguments in SPUserManager - To fix display issues, replace NSBeginAlertSheet (which includes automatic sprintf expansion of the message) with a safely-escaped SPBeginAlertSheet in many files
Diffstat (limited to 'Source/SPTableData.m')
-rw-r--r--Source/SPTableData.m9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/SPTableData.m b/Source/SPTableData.m
index 0c8d2517..a0a4d860 100644
--- a/Source/SPTableData.m
+++ b/Source/SPTableData.m
@@ -32,6 +32,7 @@
#import "SPStringAdditions.h"
#import "SPArrayAdditions.h"
#import "SPConstants.h"
+#import "SPAlertSheets.h"
@implementation SPTableData
@@ -325,7 +326,7 @@
// Check for any errors, but only display them if a connection still exists
if (![[mySQLConnection getLastErrorMessage] isEqualToString:@""]) {
if ([mySQLConnection isConnected]) {
- NSBeginAlertSheet(NSLocalizedString(@"Error retrieving table information", @"error retrieving table information message"), NSLocalizedString(@"OK", @"OK button"),
+ SPBeginAlertSheet(NSLocalizedString(@"Error retrieving table information", @"error retrieving table information message"), NSLocalizedString(@"OK", @"OK button"),
nil, nil, [NSApp mainWindow], self, nil, nil, nil,
[NSString stringWithFormat:NSLocalizedString(@"An error occurred while retrieving the information for table '%@'. Please try again.\n\nMySQL said: %@", @"error retrieving table information informative message"),
tableName, [mySQLConnection getLastErrorMessage]]);
@@ -633,7 +634,7 @@
// Check for any errors, but only display them if a connection still exists
if (![[mySQLConnection getLastErrorMessage] isEqualToString:@""]) {
if ([mySQLConnection isConnected]) {
- NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"),
+ SPBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"),
nil, nil, [NSApp mainWindow], self, nil, nil, nil,
[NSString stringWithFormat:NSLocalizedString(@"An error occured while retrieving view information.\nMySQL said: %@", @"message of panel when retrieving view information failed"),
[mySQLConnection getLastErrorMessage]]);
@@ -651,7 +652,7 @@
// Check for any errors, but only display them if a connection still exists
if (![[mySQLConnection getLastErrorMessage] isEqualToString:@""]) {
if ([mySQLConnection isConnected]) {
- NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"),
+ SPBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"),
nil, nil, [NSApp mainWindow], self, nil, nil, nil,
[NSString stringWithFormat:NSLocalizedString(@"An error occured while retrieving view information.\nMySQL said: %@", @"message of panel when retrieving view information failed"),
[mySQLConnection getLastErrorMessage]]);
@@ -754,7 +755,7 @@
// Check for any errors, only displaying them if the connection hasn't been terminated
if (![[mySQLConnection getLastErrorMessage] isEqualToString:@""]) {
if ([mySQLConnection isConnected]) {
- NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"),
+ SPBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"),
nil, nil, [NSApp mainWindow], self, nil, nil, nil,
[NSString stringWithFormat:NSLocalizedString(@"An error occured while retrieving status data.\nMySQL said: %@", @"message of panel when retrieving view information failed"),
[mySQLConnection getLastErrorMessage]]);