cum
This commit is contained in:
parent
bcf7d8c456
commit
2cce840c39
61 changed files with 157 additions and 120 deletions
|
@ -810,10 +810,11 @@ def toggle_pin_comment(cid, v):
|
|||
|
||||
comment = get_comment(cid, v=v)
|
||||
|
||||
if v.admin_level < 1 and v.id != comment.post.author_id:
|
||||
abort(403)
|
||||
if v.admin_level < 1 and v.id != comment.post.author_id: abort(403)
|
||||
|
||||
if comment.is_pinned: comment.is_pinned = None
|
||||
if comment.is_pinned:
|
||||
if comment.is_pinned.startswith("t:"): abort(403)
|
||||
else: comment.is_pinned = None
|
||||
else: comment.is_pinned = v.username
|
||||
|
||||
g.db.add(comment)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue