Merge lp:~rww/ubuntu-bots/1307766 into lp:ubuntu-bots

Proposed by rww on 2014-04-15
Status: Merged
Approved by: Terence Simpson on 2014-04-15
Approved revision: 312
Merged at revision: 312
Proposed branch: lp:~rww/ubuntu-bots/1307766
Merge into: lp:ubuntu-bots
Diff against target: 37 lines (+5/-1)
1 file modified
Bantracker/cgi/bans.cgi (+5/-1)
To merge this branch: bzr merge lp:~rww/ubuntu-bots/1307766
Reviewer Review Type Date Requested Status
Terence Simpson bugfix 2014-04-15 Approve on 2014-04-15
Review via email: mp+215801@code.launchpad.net
To post a comment you must log in.
Terence Simpson (tsimpson) :
review: Approve (bugfix)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Bantracker/cgi/bans.cgi'
--- Bantracker/cgi/bans.cgi 2012-07-05 21:20:47 +0000
+++ Bantracker/cgi/bans.cgi 2014-04-15 04:51:13 +0000
@@ -304,6 +304,7 @@
304makeInput("kicks", "Kicks")304makeInput("kicks", "Kicks")
305makeInput("bans", "Bans")305makeInput("bans", "Bans")
306makeInput("oldbans", "Removed bans")306makeInput("oldbans", "Removed bans")
307makeInput("marks", "Marks")
307print '</div>'308print '</div>'
308 309
309print '<div style="float:left">'310print '<div style="float:left">'
@@ -324,7 +325,7 @@
324 send_page('bans.tmpl')325 send_page('bans.tmpl')
325326
326# Select and filter bans327# Select and filter bans
327def getBans(id=None, mask=None, kicks=True, oldbans=True, bans=True, floodbots=True, operator=None,328def getBans(id=None, mask=None, kicks=True, oldbans=True, bans=True, marks=True, floodbots=True, operator=None,
328 channel=None, limit=None, offset=0, withCount=False):329 channel=None, limit=None, offset=0, withCount=False):
329 sql = "SELECT channel, mask, operator, time, removal, removal_op, id FROM bans"330 sql = "SELECT channel, mask, operator, time, removal, removal_op, id FROM bans"
330 args = []331 args = []
@@ -343,6 +344,8 @@
343 if channel:344 if channel:
344 where.append("channel LIKE %s")345 where.append("channel LIKE %s")
345 args.append(channel)346 args.append(channel)
347 if not marks:
348 where.append("id NOT IN (SELECT ban_id FROM comments WHERE comment LIKE '**MARK**%%')")
346 if not kicks:349 if not kicks:
347 where.append("mask LIKE '%%!%%'")350 where.append("mask LIKE '%%!%%'")
348 if not (oldbans or bans):351 if not (oldbans or bans):
@@ -424,6 +427,7 @@
424 bans, ban_count = getBans(mask=query, kicks=isOn('kicks'),427 bans, ban_count = getBans(mask=query, kicks=isOn('kicks'),
425 oldbans=isOn('oldbans') or isOn('oldmutes'),428 oldbans=isOn('oldbans') or isOn('oldmutes'),
426 bans=isOn('bans') or isOn('mutes'),429 bans=isOn('bans') or isOn('mutes'),
430 marks=isOn('marks'),
427 floodbots=isOn('floodbots'),431 floodbots=isOn('floodbots'),
428 operator=oper,432 operator=oper,
429 channel=chan,433 channel=chan,

Subscribers

People subscribed via source and target branches