remove is:recent

This commit is contained in:
Damien Elmes 2012-04-17 18:31:46 +09:00
parent 2149502a77
commit fbefb8a906

View file

@ -47,13 +47,6 @@ class Finder(object):
return [] return []
(q, args) = self._whereClause() (q, args) = self._whereClause()
order = self._order() order = self._order()
if self.lims['recent']:
query = """
select c.id from cards c, notes n where c.id in (
select id from cards c where %s limit 100)
and c.nid=n.id
%s""" % (q, order)
else:
query = """\ query = """\
select c.id from cards c, notes n where %s select c.id from cards c, notes n where %s
and c.nid=n.id %s""" % (q, order) and c.nid=n.id %s""" % (q, order)
@ -109,7 +102,6 @@ and c.nid=n.id %s""" % (q, order)
'preds': [], 'preds': [],
'args': {}, 'args': {},
'valid': True, 'valid': True,
'recent': False,
} }
for c, (token, isNeg, type) in enumerate(self._parseQuery()): for c, (token, isNeg, type) in enumerate(self._parseQuery()):
if type == SEARCH_TAG: if type == SEARCH_TAG:
@ -161,9 +153,6 @@ and c.nid=n.id %s""" % (q, order)
cond = "queue = -1" cond = "queue = -1"
elif val == "due": elif val == "due":
cond = "(queue = 2 and due <= %d)" % self.col.sched.today cond = "(queue = 2 and due <= %d)" % self.col.sched.today
elif val == "recent":
self.lims['recent'] = True
return
if neg: if neg:
cond = "not (%s)" % cond cond = "not (%s)" % cond
if cond: if cond: