From e5014b4cf47a738e05f846daebc587080f585e5a Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 29 Apr 2022 02:02:00 +0200 Subject: [PATCH 1/2] fsd --- files/routes/front.py | 3 ++- files/routes/static.py | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/files/routes/front.py b/files/routes/front.py index ccab8637c6..0486a42329 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -431,6 +431,7 @@ def changelog(v): page=page, t=t, v=v, + site=SITE ) next_exists = (len(ids) > 25) @@ -443,7 +444,7 @@ def changelog(v): @cache.memoize(timeout=86400) -def changeloglist(v=None, sort="new", page=1 ,t="all"): +def changeloglist(v=None, sort="new", page=1, t="all", site=None): posts = g.db.query(Submission.id).filter_by(is_banned=False, private=False,).filter(Submission.deleted_utc == 0) diff --git a/files/routes/static.py b/files/routes/static.py index c3dbe34c8a..c0613e91ee 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -68,11 +68,11 @@ def sidebar(v): @auth_required def participation_stats(v): - return render_template("admin/content_stats.html", v=v, title="Content Statistics", data=stats()) + return render_template("admin/content_stats.html", v=v, title="Content Statistics", data=stats(site=SITE)) @cache.memoize(timeout=86400) -def stats(): +def stats(site=None): day = int(time.time()) - 86400 week = int(time.time()) - 604800 @@ -177,20 +177,20 @@ def chart(): @app.get("/weekly_chart") @auth_required def weekly_chart(v): - file = cached_chart(kind="weekly") + file = cached_chart(kind="weekly", site=SITE) f = send_file(file) return f @app.get("/daily_chart") @auth_required def daily_chart(v): - file = cached_chart(kind="daily") + file = cached_chart(kind="daily", site=SITE) f = send_file(file) return f @cache.memoize(timeout=86400) -def cached_chart(kind): +def cached_chart(kind, site): now = time.gmtime() midnight_this_morning = time.struct_time((now.tm_year, now.tm_mon, From ebba5fd9b38cf1070d2aa5252274b2ded967d8c0 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 29 Apr 2022 15:36:33 +0200 Subject: [PATCH 2/2] gdf --- files/templates/header.html | 4 ++-- files/templates/settings_profile.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/files/templates/header.html b/files/templates/header.html index e2a1794087..15a37f3675 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -169,7 +169,7 @@ Bugs/Suggestions {% endif %} - {% if request.host not in ('pcmemes.net','watchpeopledie.co') %} + {% if SITE_NAME == 'rDrama' %} Discord {% endif %} {% if SITE_NAME != 'Cringetopia' %} @@ -225,7 +225,7 @@ Source code - {% if request.host not in ('pcmemes.net','watchpeopledie.co') %} + {% if SITE_NAME == 'rDrama' %} Discord {% endif %} {% if SITE_NAME != 'Cringetopia' %} diff --git a/files/templates/settings_profile.html b/files/templates/settings_profile.html index 680907db36..04c1f804f4 100644 --- a/files/templates/settings_profile.html +++ b/files/templates/settings_profile.html @@ -310,7 +310,7 @@ - {% if request.host not in ('pcmemes.net','watchpeopledie.co') %} + {% if SITE_NAME == 'rDrama' %}

Linked Accounts

Manage your connections to other services.