diff options
author | Bibiko <bibiko@eva.mpg.de> | 2011-05-20 17:13:19 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2011-05-20 17:13:19 +0000 |
commit | 5c7a20ad6fee72b38b5190e5c306741ba954cee2 (patch) | |
tree | 0f5c2be2fe3c1ff25f144afb28bb052218f9023e /Source | |
parent | aaccbeabcce357e24f09ed55dc911a2672fe11d9 (diff) | |
download | sequelpro-5c7a20ad6fee72b38b5190e5c306741ba954cee2.tar.gz sequelpro-5c7a20ad6fee72b38b5190e5c306741ba954cee2.tar.bz2 sequelpro-5c7a20ad6fee72b38b5190e5c306741ba954cee2.zip |
• changed the MySQL web search path
- since Oracle provides the search engine we lost the chance to search for a given language and MySQL version; due to that fact we assume that the search term by itself is the name of a valid HTML file within the dev.mysql.com domain, if not it falls back to Oracle's search engine but unfortunately with the extension ".html" which leads sometimes to no hits
- it's needed to find a better way
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPConstants.m | 2 | ||||
-rw-r--r-- | Source/SPCustomQuery.m | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/Source/SPConstants.m b/Source/SPConstants.m index 372987ed..8b524666 100644 --- a/Source/SPConstants.m +++ b/Source/SPConstants.m @@ -210,7 +210,7 @@ NSString *SPBundleDeletedDefaultBundlesKey = @"deletedDefaultBundles"; // URLs NSString *SPDonationsURL = @"http://www.sequelpro.com/donate.html"; -NSString *SPMySQLSearchURL = @"http://search.mysql.com/search/query/search?q=%@&group=refman-%@"; +NSString *SPMySQLSearchURL = @"http://dev.mysql.com/doc/refman/%@/%@/%@.html"; NSString *SPDevURL = @"http://code.google.com/p/sequel-pro/"; // Toolbar constants diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m index 507de79f..e51da22c 100644 --- a/Source/SPCustomQuery.m +++ b/Source/SPCustomQuery.m @@ -3073,15 +3073,16 @@ { NSString *version = nil; if([[mySQLversion stringByReplacingOccurrencesOfString:@"." withString:@""] integerValue] < 42) - version = @"41"; + version = @"4.1"; else - version = [mySQLversion stringByReplacingOccurrencesOfString:@"." withString:@""]; + version = [NSString stringWithString:mySQLversion]; + [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString: [[NSString stringWithFormat: SPMySQLSearchURL, - searchString, version, - NSLocalizedString(@"en", @"MySQL search language code - eg in http://search.mysql.com/search?q=select&site=refman-50&lr=lang_en")] + NSLocalizedString(@"en", @"MySQL search language code - eg in http://search.mysql.com/search?q=select&site=refman-50&lr=lang_en"), + searchString] stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]]]; } |