Filter on user pages too
This commit is contained in:
parent
f736d660b6
commit
4ecb4747c1
1 changed files with 6 additions and 1 deletions
|
@ -938,7 +938,12 @@ def u_username_comments(username, v=None):
|
||||||
comments = g.db.query(Comment.id).filter(Comment.author_id == u.id, Comment.parent_submission != None)
|
comments = g.db.query(Comment.id).filter(Comment.author_id == u.id, Comment.parent_submission != None)
|
||||||
|
|
||||||
if not v or (v.id != u.id and v.admin_level < 2):
|
if not v or (v.id != u.id and v.admin_level < 2):
|
||||||
comments = comments.filter(Comment.deleted_utc == 0, Comment.is_banned == False, Comment.ghost == False)
|
comments = comments.filter(
|
||||||
|
Comment.deleted_utc == 0,
|
||||||
|
Comment.is_banned == False,
|
||||||
|
Comment.ghost == False,
|
||||||
|
(Comment.filter_state != 'filtered') & (Comment.filter_state != 'removed')
|
||||||
|
)
|
||||||
|
|
||||||
now = int(time.time())
|
now = int(time.time())
|
||||||
if t == 'hour':
|
if t == 'hour':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue