Correctly parenthesize searches that are used to make search restrictions.

This commit is contained in:
Charles Haley 2011-04-28 18:50:34 +01:00
parent 2053ffb22c
commit 8182deb97f

View File

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