forked from rDrama/rDrama
do this https://watchpeopledie.tv/h/meta/post/61549/megathread-for-bugs-and-suggestions/3192666#context
parent
264d039cc1
commit
b54415ae14
|
@ -396,6 +396,9 @@ def delete_comment(cid, v):
|
||||||
c.deleted_utc = int(time.time())
|
c.deleted_utc = int(time.time())
|
||||||
g.db.add(c)
|
g.db.add(c)
|
||||||
|
|
||||||
|
c.author.truescore -= c.upvotes + c.downvotes
|
||||||
|
g.db.add(c.author)
|
||||||
|
|
||||||
if c.pinned:
|
if c.pinned:
|
||||||
c.pinned = None
|
c.pinned = None
|
||||||
c.pinned_utc = None
|
c.pinned_utc = None
|
||||||
|
@ -432,6 +435,9 @@ def undelete_comment(cid, v):
|
||||||
c.deleted_utc = 0
|
c.deleted_utc = 0
|
||||||
g.db.add(c)
|
g.db.add(c)
|
||||||
|
|
||||||
|
c.author.truescore += c.upvotes + c.downvotes
|
||||||
|
g.db.add(c.author)
|
||||||
|
|
||||||
if not (c.parent_post in ADMIGGER_THREADS and c.level == 1):
|
if not (c.parent_post in ADMIGGER_THREADS and c.level == 1):
|
||||||
v.comment_count += 1
|
v.comment_count += 1
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
|
|
|
@ -760,6 +760,9 @@ def delete_post_pid(pid, v):
|
||||||
|
|
||||||
g.db.add(p)
|
g.db.add(p)
|
||||||
|
|
||||||
|
p.author.truescore -= p.upvotes + p.downvotes
|
||||||
|
g.db.add(p.author)
|
||||||
|
|
||||||
cache.delete_memoized(frontlist)
|
cache.delete_memoized(frontlist)
|
||||||
cache.delete_memoized(userpagelisting)
|
cache.delete_memoized(userpagelisting)
|
||||||
|
|
||||||
|
@ -785,6 +788,9 @@ def undelete_post_pid(pid, v):
|
||||||
p.deleted_utc = 0
|
p.deleted_utc = 0
|
||||||
g.db.add(p)
|
g.db.add(p)
|
||||||
|
|
||||||
|
p.author.truescore += p.upvotes + p.downvotes
|
||||||
|
g.db.add(p.author)
|
||||||
|
|
||||||
cache.delete_memoized(frontlist)
|
cache.delete_memoized(frontlist)
|
||||||
cache.delete_memoized(userpagelisting)
|
cache.delete_memoized(userpagelisting)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue