forked from MarseyWorld/MarseyWorld
sdfdsf
parent
37df12d3b6
commit
7fb808eb9a
|
@ -303,7 +303,6 @@ def api_comment(v):
|
|||
level=level+1,
|
||||
is_bot=True,
|
||||
body_html=body_based_html,
|
||||
body=body2
|
||||
)
|
||||
|
||||
g.db.add(c_based)
|
||||
|
@ -335,7 +334,6 @@ def api_comment(v):
|
|||
level=level+1,
|
||||
is_bot=True,
|
||||
body_html=body_jannied_html,
|
||||
body=body2
|
||||
)
|
||||
|
||||
g.db.add(c_jannied)
|
||||
|
@ -369,7 +367,6 @@ def api_comment(v):
|
|||
level=level+1,
|
||||
is_bot=True,
|
||||
body_html=body_jannied_html,
|
||||
body=body
|
||||
)
|
||||
|
||||
g.db.add(c_jannied)
|
||||
|
@ -404,7 +401,6 @@ def api_comment(v):
|
|||
level=level+1,
|
||||
is_bot=True,
|
||||
body_html=body_html2,
|
||||
body=body
|
||||
)
|
||||
|
||||
g.db.add(c2)
|
||||
|
@ -442,7 +438,6 @@ def api_comment(v):
|
|||
level=level+1,
|
||||
is_bot=True,
|
||||
body_html=body_html2,
|
||||
body=body
|
||||
)
|
||||
|
||||
g.db.add(c2)
|
||||
|
@ -469,7 +464,6 @@ def api_comment(v):
|
|||
level=level+2,
|
||||
is_bot=True,
|
||||
body_html=body_html2,
|
||||
body=body,
|
||||
)
|
||||
|
||||
g.db.add(c3)
|
||||
|
@ -492,7 +486,6 @@ def api_comment(v):
|
|||
level=level+3,
|
||||
is_bot=True,
|
||||
body_html=body_html2,
|
||||
body=body
|
||||
)
|
||||
|
||||
g.db.add(c4)
|
||||
|
@ -709,7 +702,6 @@ def edit_comment(cid, v):
|
|||
level=c.level+1,
|
||||
is_bot=True,
|
||||
body_html=body_jannied_html,
|
||||
body=body
|
||||
)
|
||||
|
||||
g.db.add(c_jannied)
|
||||
|
@ -744,7 +736,6 @@ def edit_comment(cid, v):
|
|||
level=c.level+1,
|
||||
is_bot=True,
|
||||
body_html=body_jannied_html,
|
||||
body=body,
|
||||
)
|
||||
|
||||
g.db.add(c_jannied)
|
||||
|
|
|
@ -280,7 +280,6 @@ def edit_post(pid, v):
|
|||
is_pinned=True,
|
||||
distinguish_level=6,
|
||||
body_html=body_jannied_html,
|
||||
body=body
|
||||
)
|
||||
|
||||
g.db.add(c_jannied)
|
||||
|
@ -313,7 +312,6 @@ def edit_post(pid, v):
|
|||
is_pinned=True,
|
||||
distinguish_level=6,
|
||||
body_html=body_jannied_html,
|
||||
body=body
|
||||
)
|
||||
|
||||
g.db.add(c_jannied)
|
||||
|
@ -823,7 +821,6 @@ def submit_post(v):
|
|||
is_pinned=True,
|
||||
distinguish_level=6,
|
||||
body_html=body_jannied_html,
|
||||
body=body,
|
||||
)
|
||||
|
||||
g.db.add(c_jannied)
|
||||
|
@ -858,7 +855,6 @@ def submit_post(v):
|
|||
is_pinned=True,
|
||||
distinguish_level=6,
|
||||
body_html=body_jannied_html,
|
||||
body=body,
|
||||
)
|
||||
|
||||
g.db.add(c_jannied)
|
||||
|
@ -910,30 +906,30 @@ def submit_post(v):
|
|||
body_md = CustomRenderer().render(mistletoe.Document(body))
|
||||
body_html = sanitize(body_md)
|
||||
|
||||
c = Comment(author_id=SNAPPY_ACCOUNT,
|
||||
distinguish_level=6,
|
||||
parent_submission=new_post.id,
|
||||
level=1,
|
||||
over_18=False,
|
||||
is_bot=request.host!='pcmemes.net',
|
||||
app_id=None,
|
||||
body_html=body_html,
|
||||
body=body,
|
||||
)
|
||||
if len(body_html) < 20000
|
||||
c = Comment(author_id=SNAPPY_ACCOUNT,
|
||||
distinguish_level=6,
|
||||
parent_submission=new_post.id,
|
||||
level=1,
|
||||
over_18=False,
|
||||
is_bot=request.host!='pcmemes.net',
|
||||
app_id=None,
|
||||
body_html=body_html,
|
||||
)
|
||||
|
||||
g.db.add(c)
|
||||
g.db.add(c)
|
||||
|
||||
snappy = g.db.query(User).filter_by(id = SNAPPY_ACCOUNT).first()
|
||||
snappy.comment_count += 1
|
||||
snappy.coins += 1
|
||||
g.db.add(snappy)
|
||||
snappy = g.db.query(User).filter_by(id = SNAPPY_ACCOUNT).first()
|
||||
snappy.comment_count += 1
|
||||
snappy.coins += 1
|
||||
g.db.add(snappy)
|
||||
|
||||
g.db.flush()
|
||||
g.db.flush()
|
||||
|
||||
|
||||
n = Notification(comment_id=c.id, user_id=v.id)
|
||||
g.db.add(n)
|
||||
g.db.flush()
|
||||
n = Notification(comment_id=c.id, user_id=v.id)
|
||||
g.db.add(n)
|
||||
g.db.flush()
|
||||
|
||||
v.post_count = g.db.query(Submission.id).filter_by(author_id=v.id, is_banned=False, deleted_utc=0).count()
|
||||
g.db.add(v)
|
||||
|
|
Loading…
Reference in New Issue