From 7cf557b44d64430e8887ffc6d3cfe4ae17a4c669 Mon Sep 17 00:00:00 2001 From: kelson42 Date: Wed, 15 Aug 2012 19:21:11 +0000 Subject: [PATCH] + remove uselles debug message --- src/server/kiwix-serve.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/server/kiwix-serve.cpp b/src/server/kiwix-serve.cpp index 7670d57..426356a 100644 --- a/src/server/kiwix-serve.cpp +++ b/src/server/kiwix-serve.cpp @@ -221,7 +221,7 @@ static int accessHandlerCallback(void *cls, if (isVerbose()) { std::cout << "Searching suggestions for: \"" << term << "\"" << endl; } - + /* Get the suggestions */ content = "["; reader->searchSuggestions(term, maxSuggestionCount); @@ -231,8 +231,7 @@ static int accessHandlerCallback(void *cls, content += "{\"value\":\"" + suggestion + "\",\"label\":\"" + suggestion + "\"}"; suggestionCount++; } - - std::cout << suggestionCount << std::endl; + /* Try to get further suggestions with ucFirst(pattern) if maxSuggestionCount is not reached */ if (suggestionCount < 10) { term = kiwix::ucFirst(term); @@ -249,7 +248,7 @@ static int accessHandlerCallback(void *cls, if (suggestionCount < 10) { term = kiwix::lcFirst(term); reader->searchSuggestions(term, maxSuggestionCount); - while (reader->getNextSuggestion(suggestion) && suggestionCount < 10) + while (reader->getNextSuggestion(suggestion) && suggestionCount < 10) { kiwix::stringReplacement(suggestion, "\"", "\\\""); content += (content == "[" ? "" : ","); content += "{\"value\":\"" + suggestion + "\",\"label\":\"" + suggestion + "\"}";