aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Resources/English.lproj/Localizable.stringsbin230996 -> 231572 bytes
-rw-r--r--Resources/English.lproj/MainMenu.stringsbin45642 -> 45636 bytes
-rw-r--r--Resources/English.lproj/Preferences.stringsbin56394 -> 39868 bytes
-rw-r--r--Source/SPCustomQuery.m16
4 files changed, 11 insertions, 5 deletions
diff --git a/Resources/English.lproj/Localizable.strings b/Resources/English.lproj/Localizable.strings
index 846270f8..3994c05c 100644
--- a/Resources/English.lproj/Localizable.strings
+++ b/Resources/English.lproj/Localizable.strings
Binary files differ
diff --git a/Resources/English.lproj/MainMenu.strings b/Resources/English.lproj/MainMenu.strings
index 3d149080..acacf04d 100644
--- a/Resources/English.lproj/MainMenu.strings
+++ b/Resources/English.lproj/MainMenu.strings
Binary files differ
diff --git a/Resources/English.lproj/Preferences.strings b/Resources/English.lproj/Preferences.strings
index 5556624a..2fc1bbad 100644
--- a/Resources/English.lproj/Preferences.strings
+++ b/Resources/English.lproj/Preferences.strings
Binary files differ
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m
index 0bb182dd..e62c6c44 100644
--- a/Source/SPCustomQuery.m
+++ b/Source/SPCustomQuery.m
@@ -2791,7 +2791,12 @@
*/
- (void)showHelpFor:(NSString *)searchString addToHistory:(BOOL)addToHistory calledByAutoHelp:(BOOL)autoHelp
{
- if(![searchString length]) return;
+
+ // If there's no search string, show nothing if called by autohelp, and the index otherwise
+ if (![searchString length]) {
+ if (autoHelp) return;
+ searchString = SP_HELP_TOC_SEARCH_STRING;
+ }
NSString *helpString = [self getHTMLformattedMySQLHelpFor:searchString calledByAutoHelp:autoHelp];
@@ -3044,6 +3049,9 @@
if(![searchString length]) return @"";
+ // Don't escape % when being used as a wildcard, but escape it when it's being used by itself.
+ if ([searchString isEqualToString:@"%"]) searchString = @"\\%";
+
NSRange aRange;
SPMySQLResult *theResult = nil;
NSDictionary *tableDetails;
@@ -3071,8 +3079,8 @@
theResult = [mySQLConnection queryString:[NSString stringWithFormat:@"HELP '%@%%'", [searchString stringByReplacingOccurrencesOfString:@"'" withString:@"\\'"]]];
// really nothing found?
- if(![theResult numberOfRows])
- return @"";
+ if (![theResult numberOfRows])
+ return [NSString stringWithFormat:@"<em style='color: gray'>%@</em>", NSLocalizedString(@"No results found.", @"No results found for a help search")];
}
// Ensure rows are returned as strings to prevent data problems with older 4.1 servers
@@ -3128,8 +3136,6 @@
}
} else { // list all found topics
- NSUInteger r = (NSUInteger)[theResult numberOfRows];
- if (r) [theResult seekToRow:0];
// check if HELP 'contents' is called
if(![searchString isEqualToString:SP_HELP_TOC_SEARCH_STRING])