aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTextViewAdditions.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-11-16 12:09:44 +0000
committerBibiko <bibiko@eva.mpg.de>2010-11-16 12:09:44 +0000
commitc178775a335d5e6292088c4c692f53832a129fd3 (patch)
tree7cde846197f245e2f8702641e572c85b34666f92 /Source/SPTextViewAdditions.m
parent697440c0e14c20ea719fbded60d5df1bed4330d0 (diff)
downloadsequelpro-c178775a335d5e6292088c4c692f53832a129fd3.tar.gz
sequelpro-c178775a335d5e6292088c4c692f53832a129fd3.tar.bz2
sequelpro-c178775a335d5e6292088c4c692f53832a129fd3.zip
• Bundle support
- further simplifications and centralizations - runBashCommandWithEnvironment: now it can execute each script command whose first line begins with #!/... natively - added some more shell variables
Diffstat (limited to 'Source/SPTextViewAdditions.m')
-rw-r--r--Source/SPTextViewAdditions.m35
1 files changed, 1 insertions, 34 deletions
diff --git a/Source/SPTextViewAdditions.m b/Source/SPTextViewAdditions.m
index 3084138d..fdf2318c 100644
--- a/Source/SPTextViewAdditions.m
+++ b/Source/SPTextViewAdditions.m
@@ -564,39 +564,6 @@
if(currentSelectionRange.length)
[env setObject:[[self string] substringWithRange:currentSelectionRange] forKey:@"SP_SELECTED_TEXT"];
- if(![[[[[[NSApp delegate] frontDocumentWindow] delegate] selectedTableDocument] connectionID] isEqualToString:@"_"]) {
-
- id tablesListInstance = [[[[[NSApp delegate] frontDocumentWindow] delegate] selectedTableDocument] valueForKeyPath:@"tablesListInstance"];
-
- if (tablesListInstance && [tablesListInstance selectedDatabase])
- [env setObject:[tablesListInstance selectedDatabase] forKey:@"SP_SELECTED_DATABASE"];
-
- if (tablesListInstance && [tablesListInstance allDatabaseNames])
- [env setObject:[[tablesListInstance allDatabaseNames] componentsJoinedBySpacesAndQuoted] forKey:@"SP_ALL_DATABASES"];
-
- if (tablesListInstance && [tablesListInstance allTableNames])
- [env setObject:[[tablesListInstance allTableNames] componentsJoinedBySpacesAndQuoted] forKey:@"SP_ALL_TABLES"];
-
- if (tablesListInstance && [tablesListInstance allViewNames])
- [env setObject:[[tablesListInstance allViewNames] componentsJoinedBySpacesAndQuoted] forKey:@"SP_ALL_VIEWS"];
-
- if (tablesListInstance && [tablesListInstance allFunctionNames])
- [env setObject:[[tablesListInstance allFunctionNames] componentsJoinedBySpacesAndQuoted] forKey:@"SP_ALL_FUNCTIONS"];
-
- if (tablesListInstance && [tablesListInstance allProcedureNames])
- [env setObject:[[tablesListInstance allProcedureNames] componentsJoinedBySpacesAndQuoted] forKey:@"SP_ALL_PROCEDURES"];
-
- if (tablesListInstance && [tablesListInstance tableName])
- [env setObject:[tablesListInstance tableName] forKey:@"SP_SELECTED_TABLE"];
-
- if([[[[NSApp delegate] frontDocumentWindow] delegate] selectedTableDocument] && [[[[[NSApp delegate] frontDocumentWindow] delegate] selectedTableDocument] mySQLVersion])
- [env setObject:[[[[[NSApp delegate] frontDocumentWindow] delegate] selectedTableDocument] mySQLVersion] forKey:@"SP_RDBMS_VERSION"];
-
- }
-
- if(1)
- [env setObject:@"mysql" forKey:@"SP_RDBMS_TYPE"];
-
if(currentWordRange.length)
[env setObject:[[self string] substringWithRange:currentWordRange] forKey:@"SP_CURRENT_WORD"];
@@ -622,7 +589,7 @@
[[NSFileManager defaultManager] removeItemAtPath:SPBundleTaskInputFilePath error:nil];
- if(err == nil && [cmdData objectForKey:SPBundleFileOutputActionKey]) {
+ if(err == nil && output && [cmdData objectForKey:SPBundleFileOutputActionKey]) {
if([[cmdData objectForKey:SPBundleFileOutputActionKey] length]
&& ![[cmdData objectForKey:SPBundleFileOutputActionKey] isEqualToString:SPBundleOutputActionNone]) {
NSString *action = [[cmdData objectForKey:SPBundleFileOutputActionKey] lowercaseString];