sf
This commit is contained in:
parent
7860f810e0
commit
8697778ffa
1 changed files with 2 additions and 10 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue