aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-04-29 12:44:20 +0000
committerrowanbeentje <rowan@beent.je>2009-04-29 12:44:20 +0000
commit66ab1bbf6bcc3e1f3bc0d26deb057f3863000962 (patch)
tree744fcecf777b05d5028ef6a9b76ff88bfbcfed1a
parentd9a193dd1fe9c2a66a25622562660f7c520d4795 (diff)
downloadsequelpro-66ab1bbf6bcc3e1f3bc0d26deb057f3863000962.tar.gz
sequelpro-66ab1bbf6bcc3e1f3bc0d26deb057f3863000962.tar.bz2
sequelpro-66ab1bbf6bcc3e1f3bc0d26deb057f3863000962.zip
- Merge in r639 from final 0.9.5 releaserelease-tiger-v1
-rw-r--r--Source/SPQueryConsole.m8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/SPQueryConsole.m b/Source/SPQueryConsole.m
index fbe98955..05f1c81c 100644
--- a/Source/SPQueryConsole.m
+++ b/Source/SPQueryConsole.m
@@ -27,7 +27,7 @@
#define MESSAGE_TIME_STAMP_FORMAT @"%H:%M:%S"
#define DEFAULT_CONSOLE_LOG_FILENAME @"untitled"
-#define DEFAULT_CONSOLE_LOG_FILE_EXTENSION @"log"
+#define DEFAULT_CONSOLE_LOG_FILE_EXTENSION @"sql"
#define CONSOLE_WINDOW_AUTO_SAVE_NAME @"QueryConsole"
@@ -482,7 +482,9 @@ static SPQueryConsole *sharedQueryConsole = nil;
*/
- (void)_addMessageToConsole:(NSString *)message isError:(BOOL)error
{
- SPConsoleMessage *consoleMessage = [SPConsoleMessage consoleMessageWithMessage:[[message stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] stringByAppendingString:@";"] date:[NSDate date]];
+ NSMutableString *mutableMessage = [NSMutableString stringWithString:[message stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]];
+ [mutableMessage replaceOccurrencesOfString:@"\n" withString:@" " options:0 range:NSMakeRange(0, [mutableMessage length])];
+ SPConsoleMessage *consoleMessage = [SPConsoleMessage consoleMessageWithMessage:[mutableMessage stringByAppendingString:@";"] date:[NSDate date]];
[consoleMessage setIsError:error];
@@ -520,7 +522,7 @@ static SPQueryConsole *sharedQueryConsole = nil;
// If hiding SELECTs and SHOWs is toggled to on, check whether the message is a SELECT or SHOW
if (messageMatchesCurrentFilters
&& showSelectStatementsAreDisabled
- && ([message hasPrefix:@"SELECT"] || [message hasPrefix:@"SHOW"]))
+ && ([[message uppercaseString] hasPrefix:@"SELECT"] || [[message uppercaseString] hasPrefix:@"SHOW"]))
{
messageMatchesCurrentFilters = NO;
}