use {patron}

pull/173/head
Aevann 2023-08-02 00:51:05 +03:00
parent eb4a4bf709
commit 8caa93f9cd
2 changed files with 3 additions and 3 deletions

View File

@ -138,7 +138,7 @@ def process_video(file, v):
(size > MAX_VIDEO_SIZE_MB_PATRON * 1024 * 1024
or not v.patron and size > MAX_VIDEO_SIZE_MB * 1024 * 1024)):
os.remove(old)
abort(413, f"Max video size is {MAX_VIDEO_SIZE_MB} MB ({MAX_VIDEO_SIZE_MB_PATRON} MB for paypigs)")
abort(413, f"Max video size is {MAX_VIDEO_SIZE_MB} MB ({MAX_VIDEO_SIZE_MB_PATRON} MB for {patron}s)")
name_original = secure_filename(file.filename)
extension = name_original.split('.')[-1].lower()
@ -183,7 +183,7 @@ def process_image(filename, v, resize=0, trim=False, uploader_id=None, db=None):
if size > MAX_IMAGE_AUDIO_SIZE_MB_PATRON * 1024 * 1024 or not patron and size > MAX_IMAGE_AUDIO_SIZE_MB * 1024 * 1024:
os.remove(filename)
if has_request:
abort(413, f"Max image/audio size is {MAX_IMAGE_AUDIO_SIZE_MB} MB ({MAX_IMAGE_AUDIO_SIZE_MB_PATRON} MB for paypigs)")
abort(413, f"Max image/audio size is {MAX_IMAGE_AUDIO_SIZE_MB} MB ({MAX_IMAGE_AUDIO_SIZE_MB_PATRON} MB for {patron}s)")
return None
try:

View File

@ -141,7 +141,7 @@
{% endif %}
{% if v.admin_level >= PERMS['CLAIM_REWARDS_ALL_USERS'] %}
<button type="button" class="btn btn-primary d-block" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/admin/claim_rewards_all_users');" style="margin-bottom: 2em;">CLAIM PAYPIG REWARDS FOR ALL USERS</button>
<button type="button" class="btn btn-primary d-block" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/admin/claim_rewards_all_users');" style="margin-bottom: 2em;">CLAIM {{patron.upper()}} REWARDS FOR ALL USERS</button>
{% endif %}
{% endblock %}