diff --git a/files/classes/user.py b/files/classes/user.py index c551ab6e4..08dafb8db 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -27,7 +27,7 @@ cardview = bool(int(environ.get("CARD_VIEW", 1))) class User(Base): __tablename__ = "users" - if "pcmemes.net" in site: + if site == "pcmemes.net": quadrant = Column(String) basedcount = Column(Integer, default=0) pills = deferred(Column(String, default="")) diff --git a/files/routes/comments.py b/files/routes/comments.py index b53ff2533..61deea83b 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -52,7 +52,7 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None): if not pid: if comment.parent_submission: pid = comment.parent_submission elif "rama" in request.host: pid = 6489 - elif 'pcmemes.net' in request.host: pid = 2487 + elif 'pcmemes.net' == request.host: pid = 2487 else: pid = 1 try: pid = int(pid) @@ -300,7 +300,7 @@ def api_comment(v): g.db.add(c_option) - if 'pcmemes.net' in request.host and c.body.lower().startswith("based"): + if 'pcmemes.net' == request.host and c.body.lower().startswith("based"): pill = re.match("based and (.{1,20}?)(-| )pilled", body, re.IGNORECASE) if level == 1: basedguy = get_account(c.post.author_id) diff --git a/files/routes/settings.py b/files/routes/settings.py index 537369e7b..3a47b2dc7 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -388,7 +388,7 @@ def settings_profile_post(v): updated = True quadrant = request.values.get("quadrant") - if quadrant and 'pcmemes.net' in request.host.lower(): + if quadrant and 'pcmemes.net' == request.host.lower(): v.quadrant = quadrant v.customtitle = quadrant if quadrant=="Centrist": diff --git a/files/routes/users.py b/files/routes/users.py index 7bd649177..22db2bd9e 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -270,7 +270,7 @@ def leaderboard(v): - if 'pcmemes.net' in request.host: + if 'pcmemes.net' == request.host: users6 = users.order_by(User.basedcount.desc()).limit(10).all() return render_template("leaderboard.html", v=v, users1=users1, users2=users2, users3=users3, users4=users4, users5=users5, users6=users6, users7=users7, users9=users9) return render_template("leaderboard.html", v=v, users1=users1, users2=users2, users3=users3, users4=users4, users5=users5, users7=users7, users9=users9)