From 45753ee1668ace28b68a66f182d49d904a2b546f Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 1 Aug 2022 21:37:57 +0200 Subject: [PATCH] I hate programming --- files/helpers/stats.py | 4 ++-- files/routes/front.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/files/helpers/stats.py b/files/helpers/stats.py index 368718ede..7d92f3c48 100644 --- a/files/helpers/stats.py +++ b/files/helpers/stats.py @@ -25,7 +25,7 @@ def chart(kind, site): now.tm_wday, now.tm_yday, 0)) today_cutoff = calendar.timegm(midnight_this_morning) - if site == 'rdrama.net': + if SITE == 'rdrama.net': time_diff = time.time() - 1619827200 num_of_weeks = int(time_diff / 604800) chart_width = int(num_of_weeks/1.4) @@ -131,7 +131,7 @@ def stats(site=None): "users online in the past 7 days": g.db.query(User).filter(User.last_active > week).count(), } - if site == 'rDrama' or FEATURES['HOUSES']: + if SITE_NAME == 'rDrama' or FEATURES['HOUSES']: stats2 = { "House furry members": g.db.query(User).filter(User.house.like('Furry%')).count(), "House femboy members": g.db.query(User).filter(User.house.like('Femboy%')).count(), diff --git a/files/routes/front.py b/files/routes/front.py index 0e116e492..0d0189700 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -22,7 +22,7 @@ def front_all(v, sub=None, subdomain=None): if not v and not request.path.startswith('/logged_out'): return redirect(f"/logged_out{request.full_path}") - if site == 'rdrama.net' and v and v.is_banned and not v.unban_utc: + if SITE == 'rdrama.net' and v and v.is_banned and not v.unban_utc: return redirect('https://deuxrama.net') if v and request.path.startswith('/logged_out'):