dsdsaasd'
This commit is contained in:
parent
3e5520c091
commit
506cf7defe
3 changed files with 12 additions and 12 deletions
|
@ -138,11 +138,6 @@ def api_comment(v):
|
||||||
if request.content_length > 8 * 1024 * 1024: return "Max file size is 8 MB.", 413
|
if request.content_length > 8 * 1024 * 1024: return "Max file size is 8 MB.", 413
|
||||||
elif request.content_length > 4 * 1024 * 1024: return "Max file size is 4 MB.", 413
|
elif request.content_length > 4 * 1024 * 1024: return "Max file size is 4 MB.", 413
|
||||||
|
|
||||||
if v.agendaposter and random.randint(1, 10) < 7:
|
|
||||||
if request.host == 'rdrama.net':
|
|
||||||
return redirect(random.choice(['https://secure.actblue.com/donate/ms_blm_homepage_2019','https://rdrama.net/post/19711/a-short-guide-on-how-to','https://secure.transequality.org/site/Donation2?df_id=1480']))
|
|
||||||
return redirect('https://secure.actblue.com/donate/ms_blm_homepage_2019')
|
|
||||||
|
|
||||||
parent_submission = request.values.get("submission").strip()
|
parent_submission = request.values.get("submission").strip()
|
||||||
parent_fullname = request.values.get("parent_fullname").strip()
|
parent_fullname = request.values.get("parent_fullname").strip()
|
||||||
|
|
||||||
|
@ -591,6 +586,11 @@ def api_comment(v):
|
||||||
|
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
|
||||||
|
if v.agendaposter and random.randint(1, 10) < 7:
|
||||||
|
if request.host == 'rdrama.net':
|
||||||
|
return redirect(random.choice(['https://secure.actblue.com/donate/ms_blm_homepage_2019','https://rdrama.net/post/19711/a-short-guide-on-how-to','https://secure.transequality.org/site/Donation2?df_id=1480']))
|
||||||
|
return redirect('https://secure.actblue.com/donate/ms_blm_homepage_2019')
|
||||||
|
|
||||||
if request.headers.get("Authorization"): return c.json
|
if request.headers.get("Authorization"): return c.json
|
||||||
else: return render_template("comments.html", v=v, comments=[c])
|
else: return render_template("comments.html", v=v, comments=[c])
|
||||||
|
|
||||||
|
|
|
@ -525,11 +525,6 @@ def submit_post(v):
|
||||||
if request.content_length > 8 * 1024 * 1024: return "Max file size is 8 MB.", 413
|
if request.content_length > 8 * 1024 * 1024: return "Max file size is 8 MB.", 413
|
||||||
elif request.content_length > 4 * 1024 * 1024: return "Max file size is 4 MB.", 413
|
elif request.content_length > 4 * 1024 * 1024: return "Max file size is 4 MB.", 413
|
||||||
|
|
||||||
if v.agendaposter and random.randint(1, 10) < 7:
|
|
||||||
if request.host == 'rdrama.net':
|
|
||||||
return redirect(random.choice(['https://secure.actblue.com/donate/ms_blm_homepage_2019','https://rdrama.net/post/19711/a-short-guide-on-how-to','https://secure.transequality.org/site/Donation2?df_id=1480']))
|
|
||||||
return redirect('https://secure.actblue.com/donate/ms_blm_homepage_2019')
|
|
||||||
|
|
||||||
title = request.values.get("title", "").strip()
|
title = request.values.get("title", "").strip()
|
||||||
url = request.values.get("url", "").strip()
|
url = request.values.get("url", "").strip()
|
||||||
title_html = filter_title(title)
|
title_html = filter_title(title)
|
||||||
|
@ -973,6 +968,11 @@ def submit_post(v):
|
||||||
|
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
|
||||||
|
if v.agendaposter and random.randint(1, 10) < 7:
|
||||||
|
if request.host == 'rdrama.net':
|
||||||
|
return redirect(random.choice(['https://secure.actblue.com/donate/ms_blm_homepage_2019','https://rdrama.net/post/19711/a-short-guide-on-how-to','https://secure.transequality.org/site/Donation2?df_id=1480']))
|
||||||
|
return redirect('https://secure.actblue.com/donate/ms_blm_homepage_2019')
|
||||||
|
|
||||||
if request.headers.get("Authorization"): return new_post.json
|
if request.headers.get("Authorization"): return new_post.json
|
||||||
else: return redirect(new_post.permalink)
|
else: return redirect(new_post.permalink)
|
||||||
|
|
||||||
|
|
|
@ -117,14 +117,14 @@
|
||||||
<ul class="pagination pagination-sm mb-0">
|
<ul class="pagination pagination-sm mb-0">
|
||||||
{% if page>1 %}
|
{% if page>1 %}
|
||||||
<li class="page-item">
|
<li class="page-item">
|
||||||
<small><a class="page-link" href="?page={{page-1}}" tabindex="-1">Prev</a></small>
|
<small><a class="page-link" href="{{request.full_path}}&page={{page-1}}" tabindex="-1">Prev</a></small>
|
||||||
</li>
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li class="page-item disabled"><span class="page-link">Prev</span></li>
|
<li class="page-item disabled"><span class="page-link">Prev</span></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if next_exists %}
|
{% if next_exists %}
|
||||||
<li class="page-item">
|
<li class="page-item">
|
||||||
<small><a class="page-link" href="?page={{page+1}}">Next</a></small>
|
<small><a class="page-link" href="{{request.full_path}}&page={{page+1}}">Next</a></small>
|
||||||
</li>
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li class="page-item disabled"><span class="page-link">Next</span></li>
|
<li class="page-item disabled"><span class="page-link">Next</span></li>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue