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

Proposed by rww
Status: Merged
Approved by: Terence Simpson
Approved revision: 312
Merged at revision: 312
Proposed branch: lp:~rww-deactivatedaccount/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-deactivatedaccount/ubuntu-bots/1307766
Reviewer Review Type Date Requested Status
Terence Simpson bugfix Approve
Review via email: mp+215801@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Terence Simpson (tsimpson) :
review: Approve (bugfix)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Bantracker/cgi/bans.cgi'
2--- Bantracker/cgi/bans.cgi 2012-07-05 21:20:47 +0000
3+++ Bantracker/cgi/bans.cgi 2014-04-15 04:51:13 +0000
4@@ -304,6 +304,7 @@
5 makeInput("kicks", "Kicks")
6 makeInput("bans", "Bans")
7 makeInput("oldbans", "Removed bans")
8+makeInput("marks", "Marks")
9 print '</div>'
10
11 print '<div style="float:left">'
12@@ -324,7 +325,7 @@
13 send_page('bans.tmpl')
14
15 # Select and filter bans
16-def getBans(id=None, mask=None, kicks=True, oldbans=True, bans=True, floodbots=True, operator=None,
17+def getBans(id=None, mask=None, kicks=True, oldbans=True, bans=True, marks=True, floodbots=True, operator=None,
18 channel=None, limit=None, offset=0, withCount=False):
19 sql = "SELECT channel, mask, operator, time, removal, removal_op, id FROM bans"
20 args = []
21@@ -343,6 +344,8 @@
22 if channel:
23 where.append("channel LIKE %s")
24 args.append(channel)
25+ if not marks:
26+ where.append("id NOT IN (SELECT ban_id FROM comments WHERE comment LIKE '**MARK**%%')")
27 if not kicks:
28 where.append("mask LIKE '%%!%%'")
29 if not (oldbans or bans):
30@@ -424,6 +427,7 @@
31 bans, ban_count = getBans(mask=query, kicks=isOn('kicks'),
32 oldbans=isOn('oldbans') or isOn('oldmutes'),
33 bans=isOn('bans') or isOn('mutes'),
34+ marks=isOn('marks'),
35 floodbots=isOn('floodbots'),
36 operator=oper,
37 channel=chan,

Subscribers

People subscribed via source and target branches