Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed new voting points

  • Loading branch information...
commit 12395c891b11c9429e6d321186400ae2653bc8cd 1 parent 59c0fee
@NoahY authored
Showing with 14 additions and 6 deletions.
  1. +14 −6 qa-history-layer.php
View
20 qa-history-layer.php
@@ -177,12 +177,20 @@ function user_activity_form() {
$options=qa_get_options($optionnames);
$multi = (int)$options['points_multiple'];
- $option_events['in_q_vote_up'] = (int)$options['points_per_q_voted']*$multi;
- $option_events['in_q_vote_down'] = (int)$options['points_per_q_voted']*$multi*(-1);
- $option_events['in_q_vote_nil'] = (int)$options['points_per_q_voted']*$multi;
- $option_events['in_a_vote_up'] = (int)$options['points_per_a_voted']*$multi;
- $option_events['in_a_vote_down'] = (int)$options['points_per_a_voted']*$multi*(-1);
- $option_events['in_a_vote_nil'] = (int)$options['points_per_a_voted']*$multi;
+ // compat fudge
+ $upvote = '';
+ $downvote = '';
+ if($options['points_per_q_voted_up']) {
+ $upvote = '_up';
+ $downvote = '_down';
+ }
+
+ $option_events['in_q_vote_up'] = (int)$options['points_per_q_voted'.$upvote]*$multi;
+ $option_events['in_q_vote_down'] = (int)$options['points_per_q_voted'.$downvote]*$multi*(-1);
+ //$option_events['in_q_vote_nil'] = (int)$options['points_per_q_voted']*$multi;
+ $option_events['in_a_vote_up'] = (int)$options['points_per_a_voted'.$upvote]*$multi;
+ $option_events['in_a_vote_down'] = (int)$options['points_per_a_voted'.$downvote]*$multi*(-1);
+ //$option_events['in_a_vote_nil'] = (int)$options['points_per_a_voted']*$multi;
$option_events['in_a_select'] = (int)$options['points_a_selected']*$multi;
$option_events['in_a_unselect'] = (int)$options['points_a_selected']*$multi*(-1);
$option_events['q_post'] = (int)$options['points_post_q']*$multi;
Please sign in to comment.
Something went wrong with that request. Please try again.