fdsfsd
This commit is contained in:
parent
8309e60279
commit
029e35450b
1 changed files with 9 additions and 13 deletions
|
@ -815,19 +815,15 @@ def ban_user(user_id, v):
|
||||||
|
|
||||||
if 'reason' in request.values:
|
if 'reason' in request.values:
|
||||||
if reason.startswith("/post/"):
|
if reason.startswith("/post/"):
|
||||||
try:
|
post = int(reason.split("/post/")[1].split(None, 1)[0])
|
||||||
post = int(reason.split("/post/")[1])
|
post = get_post(post)
|
||||||
post = get_post(post)
|
post.bannedfor = True
|
||||||
post.bannedfor = True
|
g.db.add(post)
|
||||||
g.db.add(post)
|
elif reason.startswith("/comment/"):
|
||||||
except: pass
|
comment = int(reason.split("/comment/")[1].split(None, 1)[0])
|
||||||
elif reason.startswith("/comment/"):
|
comment = get_comment(comment)
|
||||||
try:
|
comment.bannedfor = True
|
||||||
comment = int(reason.split("/comment/")[1])
|
g.db.add(comment)
|
||||||
comment = get_comment(comment)
|
|
||||||
comment.bannedfor = True
|
|
||||||
g.db.add(comment)
|
|
||||||
except: pass
|
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
|
||||||
if 'redir' in request.values: return redirect(user.url)
|
if 'redir' in request.values: return redirect(user.url)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue