forked from MarseyWorld/MarseyWorld
fdsdsf
parent
be445a99b1
commit
031d74efdb
|
@ -271,12 +271,11 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false"
|
|||
posts = g.db.query(Submission)
|
||||
|
||||
if sub: posts = posts.filter_by(sub=sub.name)
|
||||
elif subs:
|
||||
if v and v.all_blocks: posts = posts.filter(or_(Submission.sub == None, Submission.sub.notin_(v.all_blocks)))
|
||||
else:
|
||||
if subsonly:
|
||||
elif subsonly:
|
||||
posts = posts.filter(Submission.sub != None)
|
||||
if v and v.all_blocks: posts = posts.filter(Submission.sub.notin_(v.all_blocks))
|
||||
elif subs:
|
||||
if v and v.all_blocks: posts = posts.filter(or_(Submission.sub == None, Submission.sub.notin_(v.all_blocks)))
|
||||
elif SITE_NAME == 'Drama': posts = posts.filter(Submission.sub == None)
|
||||
elif v and v.all_blocks: posts = posts.filter(or_(Submission.sub == None, Submission.sub.notin_(v.all_blocks)))
|
||||
|
||||
|
@ -352,12 +351,11 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false"
|
|||
if (sort == "hot" or (v and v.id == Q_ID)) and page == 1 and ccmode == "false" and not gt and not lt:
|
||||
pins = g.db.query(Submission).filter(Submission.stickied != None, Submission.is_banned == False)
|
||||
if sub: pins = pins.filter_by(sub=sub.name)
|
||||
elif subs:
|
||||
if v and v.all_blocks: pins = pins.filter(or_(Submission.sub == None, Submission.sub.notin_(v.all_blocks)))
|
||||
else:
|
||||
if subsonly:
|
||||
elif subsonly:
|
||||
pins = pins.filter(Submission.sub != None)
|
||||
if v and v.all_blocks: pins = pins.filter(Submission.sub.notin_(v.all_blocks))
|
||||
elif subs:
|
||||
if v and v.all_blocks: pins = pins.filter(or_(Submission.sub == None, Submission.sub.notin_(v.all_blocks)))
|
||||
elif SITE_NAME == 'Drama': pins = pins.filter(Submission.sub == None)
|
||||
elif v and v.all_blocks: pins = pins.filter(or_(Submission.sub == None, Submission.sub.notin_(v.all_blocks)))
|
||||
|
||||
|
|
Loading…
Reference in New Issue