Compare commits
4 Commits
7b17fb8c39
...
ca8c8297c5
Author | SHA1 | Date |
---|---|---|
Aevann | ca8c8297c5 | |
Aevann | 4b8387a01c | |
Aevann | 053ef9fd66 | |
Aevann | e2cc1f9c80 |
|
@ -213,6 +213,7 @@ def post_id(pid, anything=None, v=None, sub=None):
|
|||
pinned2.add(pin)
|
||||
|
||||
pinned = list(pinned2)
|
||||
pinned.sort(key=lambda x: x.created_utc, reverse=True)
|
||||
post.replies = pinned + comments
|
||||
|
||||
post.views += 1
|
||||
|
|
|
@ -60,8 +60,10 @@ def vote_post_comment(target_id, new, v, cls, vote_cls):
|
|||
if v.id == target.author.id:
|
||||
coin_delta = 0
|
||||
|
||||
alt = False
|
||||
if target.author.id in v.alt_ids or v.id in target.author.alt_ids:
|
||||
coin_delta = -1
|
||||
alt = True
|
||||
|
||||
coin_mult = 1
|
||||
|
||||
|
@ -101,7 +103,7 @@ def vote_post_comment(target_id, new, v, cls, vote_cls):
|
|||
target.author.truescore += coin_delta
|
||||
g.db.add(target.author)
|
||||
|
||||
real = new != 1 or v.is_votes_real
|
||||
real = alt or new != 1 or v.is_votes_real
|
||||
vote = None
|
||||
if vote_cls == Vote:
|
||||
vote = Vote(user_id=v.id,
|
||||
|
@ -141,7 +143,7 @@ def vote_post_comment(target_id, new, v, cls, vote_cls):
|
|||
target.upvotes = get_vote_count(1, False)
|
||||
target.downvotes = get_vote_count(-1, False)
|
||||
|
||||
if SITE_NAME == 'rDrama':
|
||||
if SITE == 'rdrama.net':
|
||||
target.realupvotes = get_vote_count(0, True) # first arg is ignored here
|
||||
|
||||
mul = 1
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</span>
|
||||
<h5>You are blocking @{{u.username}}.</h5>
|
||||
<p class="text-muted">So we aren't going to show you their profile.</p>
|
||||
<button type="button" class="btn btn-success text-success mt-2" onclick="postToastReload(this,'/settings/unblock?username={{u.username}}')"><i class="fas fa-eye text-success mr-2"></i>Unblock user</a>
|
||||
<button type="button" class="btn btn-success text-success mt-2" onclick="postToastReload(this,'/settings/unblock?username={{u.username}}')"><i class="fas fa-eye text-success mr-2"></i>Unblock @{{u.username}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue