$this->reports = $this->count_all_votes("<0"); $this->votes = $vote->count() - $this->reports; } $this->store_basic(); $this->check_should_publish(); $vars = array('vote' => $this); check_actions('link_insert_vote_post', $vars); return true; } return false; } } check_referrer(); $post_id = sanitize($_POST['id'], 3); if (is_numeric($post_id) && $post_id > 0) { $link = new LinkTotal(); $link->id = $post_id; $link->read_basic(); if ($current_user->user_id == 0 && !anonymous_vote) { error($main_smarty->get_config_vars('PLIGG_Visual_Vote_NoAnon')); } $post_user = sanitize($_POST['user'], 3); if ($current_user->user_id != $post_user) { error($main_smarty->get_config_vars('PLIGG_Visual_Vote_BadUser') . $current_user->user_id . '-' . $post_user); } $md5 = md5($post_user . $link->randkey); if ($md5 !== sanitize($_POST['md5'], 3)) { error($main_smarty->get_config_vars('PLIGG_Visual_Vote_BadKey')); } $value = sanitize($_POST['value'], 3); if (sanitize($_POST['unvote'], 3) == 'true') {
$this->reports = $this->count_all_votes("<0"); $this->votes = $vote->count() - $this->reports; } $this->store_basic(); $this->check_should_publish(); $vars = array('vote' => $this); check_actions('link_insert_vote_post', $vars); return true; } return false; } } check_referrer(); $post_id = sanitize($_POST['id'], 3); if (is_numeric($post_id) && $post_id > 0) { $link = new LinkTotal(); $link->id = $post_id; $link->read_basic(); if ($current_user->user_id == 0 && !anonymous_vote) { error($main_smarty->get_config_vars('PLIGG_Visual_Vote_NoAnon')); } $post_user = sanitize($_POST['user'], 3); if ($current_user->user_id != $post_user) { error($main_smarty->get_config_vars('PLIGG_Visual_Vote_BadUser') . $current_user->user_id . '-' . $post_user); } $md5 = md5($post_user . $link->randkey); if ($md5 !== sanitize($_POST['md5'], 3)) { error($main_smarty->get_config_vars('PLIGG_Visual_Vote_BadKey')); } $value = intval($_POST['value']); if (sanitize($_POST['unvote'], 3) == 'true') {