forked from MarseyWorld/MarseyWorld
fds
parent
e11ae7581d
commit
43006ba440
|
@ -112,11 +112,10 @@ def notifications(v):
|
|||
Comment.body_html.notlike('<html><body><p>New site mention: <a href="https://old.reddit.com/r/%')
|
||||
).order_by(Comment.top_comment_id.desc(), Notification.created_utc.desc()).subquery()
|
||||
|
||||
comments = g.db.query(Comment).join(sq, sq.c.id == Comment.id).order_by(sq.c.created_utc.desc())
|
||||
if not (v and (v.shadowbanned or v.admin_level > 1)):
|
||||
comments = comments.join(User, User.id == Comment.author_id).filter(User.shadowbanned == None)
|
||||
|
||||
comments = comments.offset(25 * (page - 1)).limit(26).all()
|
||||
if v and (v.shadowbanned or v.admin_level > 1):
|
||||
comments = g.db.query(Comment).join(sq, sq.c.id == Comment.id).order_by(sq.c.created_utc.desc()).offset(25 * (page - 1)).limit(26).all()
|
||||
else:
|
||||
comments = g.db.query(Comment).join(sq, sq.c.id == Comment.id).join(User, User.id == Comment.author_id).filter(User.shadowbanned == None).order_by(sq.c.created_utc.desc()).offset(25 * (page - 1)).limit(26).all()
|
||||
|
||||
next_exists = (len(comments) > 25)
|
||||
comments = comments[:25]
|
||||
|
|
|
@ -832,7 +832,7 @@ def u_username(username, v=None):
|
|||
if request.headers.get("Authorization") or request.headers.get("xhr"): return {"error": f"That username is reserved for: {u.reserved}"}
|
||||
return render_template("userpage_reserved.html", u=u, v=v)
|
||||
|
||||
if v and u.id != v.id and (u.patron or u.admin_level > 1):
|
||||
if v and v.id not in (u.id,DAD_ID) and (u.patron or u.admin_level > 1):
|
||||
view = g.db.query(ViewerRelationship).filter_by(viewer_id=v.id, user_id=u.id).one_or_none()
|
||||
|
||||
if view: view.last_view_utc = int(time.time())
|
||||
|
|
|
@ -231,7 +231,7 @@
|
|||
<img alt="/h/{{sub.name}} banner" role="button" data-bs-toggle="modal" data-bs-target="#expandImageModal" onclick="expandDesktopImage('{{sub.banner_url}}')" loading="lazy" src="{{sub.banner_url}}" width=100% style="object-fit:cover;max-height:25vw">
|
||||
{% elif SITE_NAME == 'rDrama' %}
|
||||
{% set path = "assets/images/" + SITE_NAME + "/banners" %}
|
||||
{% set image = "/" + path + "/" + listdir('files/' + path)|random() + '?v=23' %}
|
||||
{% set image = "/" + path + "/" + listdir('files/' + path)|random() + '?v=24' %}
|
||||
|
||||
<a href="https://secure.transequality.org/site/Donation2?df_id=1480">
|
||||
{% if v and (v.shadowbanned or v.is_banned or v.agendaposter) %}
|
||||
|
|
Loading…
Reference in New Issue