From 5c7a20ad6fee72b38b5190e5c306741ba954cee2 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Fri, 20 May 2011 17:13:19 +0000 Subject: =?UTF-8?q?=E2=80=A2=20changed=20the=20MySQL=20web=20search=20path?= =?UTF-8?q?=20-=20since=20Oracle=20provides=20the=20search=20engine=20we?= =?UTF-8?q?=20lost=20the=20chance=20to=20search=20for=20a=20given=20langua?= =?UTF-8?q?ge=20and=20MySQL=20version;=20due=20to=20that=20fact=20we=20ass?= =?UTF-8?q?ume=20that=20the=20search=20term=20by=20itself=20is=20the=20nam?= =?UTF-8?q?e=20of=20a=20valid=20HTML=20file=20within=20the=20dev.mysql.com?= =?UTF-8?q?=20domain,=20if=20not=20it=20falls=20back=20to=20Oracle's=20sea?= =?UTF-8?q?rch=20engine=20but=20unfortunately=20with=20the=20extension=20"?= =?UTF-8?q?.html"=20which=20leads=20sometimes=20to=20no=20hits=20-=20it's?= =?UTF-8?q?=20needed=20to=20find=20a=20better=20way?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPConstants.m | 2 +- 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]]]; } -- cgit v1.2.3