Correctly parenthesize searches that are used to make search restrictions

This commit is contained in:
Kovid Goyal 2011-04-28 12:13:10 -06:00
commit 7267091aea

View File

@ -783,7 +783,7 @@ class ResultCache(SearchQueryParser): # {{{
else:
q = query
if search_restriction:
q = u'%s (%s)' % (search_restriction, query)
q = u'(%s) and (%s)' % (search_restriction, query)
if not q:
if set_restriction_count:
self.search_restriction_book_count = len(self._map)