Skip to content

Commit 4a8b855

Browse files
committed
Fix hidding own vote class during deleting point
1 parent 1680f24 commit 4a8b855

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

root/reputation.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,6 +1186,7 @@
11861186
'user_reputation' => '<strong>' . $user_reputation . '</strong>',
11871187
'reputation_rank' => $reputation_rank,
11881188
'post_reputation' => $post_reputation,
1189+
'own_vote' => ($row['rep_from'] == $user->data['user_id']) ? true : false,
11891190
'reputation_class' => $reputation->get_vote_class($post_reputation),
11901191
'highlight' => (!empty($config['rs_post_highlight']) && ($post_reputation < $config['rs_post_highlight'])) ? true : false,
11911192
'hidden' => (!empty($config['rs_hide_post']) && ($post_reputation > $config['rs_hide_post'])) ? true : false,

root/styles/prosilver/template/reputation/jquery.reputation.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,11 @@ function response(a, b, c, d)
302302
$('#profile' + poster_id + ' .reputation-rank').html(a.reputation_rank);
303303
$('#p' + post_id + ' .reputation a').text(a.post_reputation);
304304
$('#p' + post_id + ' .reputation').removeClass('zero negative positive').addClass(a.reputation_class);
305-
$('#p' + post_id + ' .post-reputation').removeClass('rated_good rated_bad');
305+
306+
if (a.own_vote)
307+
{
308+
$('#p' + post_id + ' .post-reputation').removeClass('rated_good rated_bad');
309+
}
306310

307311
if (a.highlight)
308312
{

0 commit comments

Comments
 (0)