fsd
This commit is contained in:
parent
9c3d6d49a1
commit
c042dcc26b
7 changed files with 52 additions and 46 deletions
|
@ -354,7 +354,7 @@ def award_post(pid, v):
|
|||
g.db.commit()
|
||||
if request.referrer and len(request.referrer) > 1:
|
||||
if request.referrer == f'{SITE_FULL}/submit': return redirect(post.permalink)
|
||||
elif request.referrer.startswith(SITE_FULL): return redirect(request.referrer)
|
||||
elif request.referrer.startswith(f'{SITE_FULL}/'): return redirect(request.referrer)
|
||||
return redirect(SITE_FULL)
|
||||
|
||||
|
||||
|
@ -590,7 +590,7 @@ def award_comment(cid, v):
|
|||
g.db.add(author)
|
||||
|
||||
g.db.commit()
|
||||
if request.referrer and len(request.referrer) > 1 and request.referrer.startswith(SITE_FULL):
|
||||
if request.referrer and len(request.referrer) > 1 and request.referrer.startswith(f'{SITE_FULL}/'):
|
||||
return redirect(request.referrer)
|
||||
return redirect(SITE_FULL)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue