forked from MarseyWorld/MarseyWorld
fdfd
parent
8271debb42
commit
1a8d9b6a0c
|
@ -13,8 +13,8 @@ from .flags import CommentFlag
|
|||
from random import randint
|
||||
|
||||
site = environ.get("DOMAIN").strip()
|
||||
if site == 'pcmemes.net': cc = "splash mountain"
|
||||
else: cc = "country club"
|
||||
if site == 'pcmemes.net': cc = "SPLASH MOUNTAIN"
|
||||
else: cc = "COUNTRY CLUB"
|
||||
|
||||
class Comment(Base):
|
||||
|
||||
|
@ -305,7 +305,7 @@ class Comment(Base):
|
|||
return data
|
||||
|
||||
def realbody(self, v):
|
||||
if self.post and self.post.club and not (v and v.paid_dues): return f"<p>{cc} ONLY</p>"
|
||||
if self.post and self.post.club and not (v and v.paid_dues) and not (v and v.id == self.author_id): return f"<p>{cc} ONLY</p>"
|
||||
|
||||
body = self.body_html
|
||||
|
||||
|
@ -342,7 +342,7 @@ class Comment(Base):
|
|||
return body
|
||||
|
||||
def plainbody(self, v):
|
||||
if self.post and self.post.club and not (v and v.paid_dues): return f"<p>{cc} ONLY</p>"
|
||||
if self.post and self.post.club and not (v and v.paid_dues) and not (v and v.id == self.author_id): return f"<p>{cc} ONLY</p>"
|
||||
|
||||
body = self.body
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ from files.helpers.lazy import lazy
|
|||
from os import environ
|
||||
|
||||
site = environ.get("DOMAIN").strip()
|
||||
if site == 'pcmemes.net': cc = "splash mountain"
|
||||
else: cc = "country club"
|
||||
if site == 'pcmemes.net': cc = "SPLASH MOUNTAIN"
|
||||
else: cc = "COUNTRY CLUB"
|
||||
|
||||
class ModAction(Base):
|
||||
__tablename__ = "modactions"
|
||||
|
@ -82,7 +82,7 @@ class ModAction(Base):
|
|||
@lazy
|
||||
def string(self):
|
||||
|
||||
output = ACTIONTYPES[self.kind]["str"].format(self=self, cc=cc)
|
||||
output = ACTIONTYPES[self.kind]["str"].format(self=self)
|
||||
|
||||
if self.note: output += f" <i>({self.note})</i>"
|
||||
|
||||
|
@ -93,7 +93,7 @@ class ModAction(Base):
|
|||
def target_link(self):
|
||||
if self.target_user: return f'<a href="{self.target_user.url}">{self.target_user.username}</a>'
|
||||
elif self.target_post:
|
||||
if self.target_post.club: return f'<a href="{self.target_post.permalink}">{cc.upper()} ONLY</a>'
|
||||
if self.target_post.club: return f'<a href="{self.target_post.permalink}">{cc} ONLY</a>'
|
||||
return f'<a href="{self.target_post.permalink}">{self.target_post.title.replace("<","").replace(">","")}</a>'
|
||||
elif self.target_comment_id: return f'<a href="/comment/{self.target_comment_id}?context=9#context">comment</a>'
|
||||
|
||||
|
|
Loading…
Reference in New Issue