forked from rDrama/rDrama
lawlzposts: fix a couple of bugs
parent
0a9e7b3ef4
commit
e248295880
|
@ -1251,7 +1251,7 @@ def unsticky_post(post_id, v):
|
|||
post = get_post(post_id)
|
||||
if post.stickied:
|
||||
if post.stickied.endswith('(pin award)'): abort(403, "Can't unpin award pins!")
|
||||
if post.author_id == LAWLZ_ID and SITE_NAME == 'rDrama': abort(403, "Can't unpin lawlzposts!")
|
||||
if post.author_id == LAWLZ_ID and post.stickied_utc and SITE_NAME == 'rDrama': abort(403, "Can't unpin lawlzposts!")
|
||||
|
||||
post.stickied = None
|
||||
post.stickied_utc = None
|
||||
|
|
|
@ -164,7 +164,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false"
|
|||
|
||||
if v: pins = pins.filter(Submission.author_id.notin_(v.userblocks))
|
||||
if SITE_NAME == 'rDrama':
|
||||
pins = pins.order_by(Submission.author_id == LAWLZ_ID)
|
||||
pins = pins.order_by(Submission.author_id != LAWLZ_ID)
|
||||
pins = pins.order_by(Submission.created_utc.desc()).all()
|
||||
|
||||
posts = pins + posts
|
||||
|
|
Loading…
Reference in New Issue