fds
This commit is contained in:
parent
34cf0411f5
commit
9f5e77139e
2 changed files with 3 additions and 12 deletions
|
@ -270,8 +270,8 @@ def sanitize(sanitized, alert=False, comment=False, edit=False):
|
||||||
|
|
||||||
url = urlparse(href)
|
url = urlparse(href)
|
||||||
domain = url.netloc
|
domain = url.netloc
|
||||||
path = url.path
|
url_path = url.path
|
||||||
domain_list.add(domain+path)
|
domain_list.add(domain+url_path)
|
||||||
|
|
||||||
parts = domain.split(".")
|
parts = domain.split(".")
|
||||||
for i in range(len(parts)):
|
for i in range(len(parts)):
|
||||||
|
|
|
@ -160,13 +160,6 @@ def searchposts(v):
|
||||||
|
|
||||||
posts = get_posts(ids, v=v)
|
posts = get_posts(ids, v=v)
|
||||||
|
|
||||||
if v and v.admin_level>3 and "domain" in criteria:
|
|
||||||
domain=criteria['domain']
|
|
||||||
domain_obj=get_domain(domain)
|
|
||||||
else:
|
|
||||||
domain=None
|
|
||||||
domain_obj=None
|
|
||||||
|
|
||||||
if request.headers.get("Authorization"): return {"total":total, "data":[x.json for x in posts]}
|
if request.headers.get("Authorization"): return {"total":total, "data":[x.json for x in posts]}
|
||||||
|
|
||||||
return render_template("search.html",
|
return render_template("search.html",
|
||||||
|
@ -177,9 +170,7 @@ def searchposts(v):
|
||||||
listing=posts,
|
listing=posts,
|
||||||
sort=sort,
|
sort=sort,
|
||||||
t=t,
|
t=t,
|
||||||
next_exists=next_exists,
|
next_exists=next_exists
|
||||||
domain=domain,
|
|
||||||
domain_obj=domain_obj
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@app.get("/search/comments")
|
@app.get("/search/comments")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue