diff --git a/Bantracker/cgi/bans.cgi b/Bantracker/cgi/bans.cgi index 52eb992..3707127 100755 --- a/Bantracker/cgi/bans.cgi +++ b/Bantracker/cgi/bans.cgi @@ -233,7 +233,7 @@ print '' tz = pytz.timezone(tz) -haveQuery = form.has_key('query') or form.has_key('channel') or form.has_key('operator') +haveQuery = 'query' in form or 'channel' in form or 'operator' in form def isOn(k): default = not haveQuery @@ -284,6 +284,12 @@ print '' print '
' print '' +if not haveQuery: + # sqlite2 sucks, getting the last bans takes a lot of time. + # so lets disable that so at least the page loads quickly. + print '
' + send_page('bans.tmpl') + # Select and filter bans def getBans(id=None, mask=None, kicks=True, oldbans=True, bans=True, floodbots=True, operator=None, channel=None, limit=None, offset=0, withCount=False):