Why isn’t QA post reputation updating?

3.00K viewsIssues
0

First, thanks Rahul for answering my previous question. But to expand, when an upvote or downvote is clicked, the USER’s reputation is updated, +5, -3, +2, -1…

But, the number between the upvote and downvote is not updated/incremented. I’ve been looking in the PHP for where this html element gets updated, but can’t pinpoint it. In the vote_up function, where can i find where the QA-specific-post reputation gets updated? Hopefully I can look further into this and help find an issue.

Also, it allows me to upvote or downvote as many times as I want, not doing the typical “upvote, then i click it again and it takes it away.”

public function vote_up($postid, $counts) {
		$post = get_post($postid);
		
		// give reputation to post author
		if($post->post_type == 'question')
			$reputation = ap_reputation_by_event('question_upvote', true);
		elseif($post->post_type == 'answer')
			$reputation = ap_reputation_by_event('answer_upvote', true);
		
		$uid = $post->post_author;
		if(!empty($reputation))
			ap_reputation('vote_up', $uid, $reputation, $postid);
		
		if($post->post_type == 'question')
			$reputation = ap_reputation_by_event('question_upvoted', true);
		elseif($post->post_type == 'answer')
			$reputation = ap_reputation_by_event('answer_upvoted', true);
		
		$userid = get_current_user_id();
		
		if(!empty($reputation))
			return ap_reputation('vote_up', $userid, $reputation, $postid);
		return false;
	}

Attachments

upvote.png

This should not be happen, I will investigate the issue,