forked from rDrama/rDrama
master
parent
dc03802454
commit
0d60616a15
|
@ -68,17 +68,9 @@ def searchposts(v):
|
||||||
words=tuple(words)
|
words=tuple(words)
|
||||||
posts=posts.filter(*words)
|
posts=posts.filter(*words)
|
||||||
|
|
||||||
if 'over18' in criteria:
|
if 'over18' in criteria: posts = posts.filter(Submission.over_18==True)
|
||||||
posts = posts.filter(Submission.over_18==True)
|
|
||||||
|
|
||||||
if 'author' in criteria:
|
if 'author' in criteria: posts = posts.filter(Submission.author_id == get_user(criteria['author']).id)
|
||||||
if v and v.admin_level == 6:
|
|
||||||
posts = posts.filter(Submission.author_id == get_user(criteria['author']).id)
|
|
||||||
else:
|
|
||||||
posts=posts.filter(
|
|
||||||
Submission.author_id==get_user(criteria['author']).id,
|
|
||||||
User.is_private==False,
|
|
||||||
)
|
|
||||||
|
|
||||||
if 'domain' in criteria:
|
if 'domain' in criteria:
|
||||||
domain=criteria['domain']
|
domain=criteria['domain']
|
||||||
|
|
Loading…
Reference in New Issue