forked from rDrama/rDrama
fix last commit
parent
52b7161938
commit
83550c33bd
|
@ -29,6 +29,7 @@ from files.cli import app, db_session, g
|
|||
@click.option('--every-1mo', is_flag=True, help='Call every 1 month.')
|
||||
def cron(every_5m, every_1h, every_1d, every_1mo):
|
||||
g.db = db_session()
|
||||
g.v = None
|
||||
|
||||
if every_5m:
|
||||
if FEATURES['GAMBLING']:
|
||||
|
|
|
@ -328,7 +328,7 @@ def handle_youtube_links(url):
|
|||
def sanitize(sanitized, golden=True, limit_pings=0, showmore=True, count_marseys=False, torture=False, snappy=False, chat=False, blackjack=None):
|
||||
sanitized = sanitized.strip()
|
||||
|
||||
if hasattr(g, 'v') and blackjack and execute_blackjack(g.v, None, sanitized, blackjack):
|
||||
if blackjack and execute_blackjack(g.v, None, sanitized, blackjack):
|
||||
sanitized = 'g'
|
||||
|
||||
sanitized = utm_regex.sub('', sanitized)
|
||||
|
@ -515,7 +515,7 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=True, count_marseys
|
|||
if '<pre>' not in sanitized and blackjack != "rules":
|
||||
sanitized = sanitized.replace('\n','')
|
||||
|
||||
if showmore and not (hasattr(g, 'v') and g.v.id == AEVANN_ID):
|
||||
if showmore:
|
||||
# Insert a show more button if the text is too long or has too many paragraphs
|
||||
CHARLIMIT = 3000
|
||||
pos = 0
|
||||
|
|
|
@ -9,7 +9,6 @@ from files.__main__ import app, limiter, get_CF
|
|||
|
||||
@app.before_request
|
||||
def before_request():
|
||||
print('1', flush=True)
|
||||
g.v = None
|
||||
|
||||
if request.host != SITE:
|
||||
|
|
|
@ -60,7 +60,6 @@ def get_logged_in_user():
|
|||
if request.method.lower() != "get" and get_setting('read_only_mode') and not (v and v.admin_level >= PERMS['SITE_BYPASS_READ_ONLY_MODE']):
|
||||
abort(403)
|
||||
|
||||
print('2', flush=True)
|
||||
g.v = v
|
||||
|
||||
if v:
|
||||
|
|
Loading…
Reference in New Issue