I think this fixes the 3 minute urlhistory bug. Sorry >_<

This commit is contained in:
melonhead 2010-03-06 17:19:22 +00:00
parent b7ef6968f7
commit def6537f72
1 changed files with 2 additions and 2 deletions

View File

@ -31,13 +31,13 @@ def insert_history(db, chan, url, nick):
def get_history_duration(db, chan, url, duration):
db.execute("delete from urlhistory where time < ?",
(time.time() - duration,))
return db.execute("select nick, time from urlhistory where "
"chan=? and url=? order by time desc", (chan, url)).fetchall()
def get_history(db, chan, url):
db.execute("delete from urlhistory where time < ?",
(time.time() - duration,))
return get_history_duration(db, chan, url, expiration_period)