<commit_before><?php
require_once('../includes/config.php');

$errors	= array();
$data	= array();

if(isset($_POST['_csrf']) && session_csrf_check($_POST['_csrf'])) {
	if(isset($_POST['election_id']) && !empty($_POST['election_id'] && does_election_exist($_POST['election'])) && (isset($_POST['accept']) || isset($_POST['decline']))) {
		if(isset($_POST['accept'])) {
			set_user_election_access(get_current_user(), $_POST['election_id'], 101);
			
			$data['success'] = true;
			$data['message'] = 'Success!';
		} else if(isset($_POST['decline'])) {
			set_user_election_access(get_current_user(), $_POST['election_id'], 0);
			
			$data['success'] = true;
			$data['message'] = 'Success!';<commit_msg>Fix POST variable name<commit_after><?php
require_once('../includes/config.php');

$errors	= array();
$data	= array();

if(isset($_POST['_csrf']) && session_csrf_check($_POST['_csrf'])) {
	if(isset($_POST['election_id']) && !empty($_POST['election_id'] && does_election_exist($_POST['election_id'])) && (isset($_POST['accept']) || isset($_POST['decline']))) {
		if(isset($_POST['accept'])) {
			set_user_election_access(get_current_user(), $_POST['election_id'], 101);
			
			$data['success'] = true;
			$data['message'] = 'Success!';
		} else if(isset($_POST['decline'])) {
			set_user_election_access(get_current_user(), $_POST['election_id'], 0);
			
			$data['success'] = true;
			$data['message'] = 'Success!';
{'fraction_non_alphanumeric': 0.24259520451339917, 'fraction_numerical': 0.005641748942172073, 'mean_word_length': 7.347058823529411, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '529677', 'n_tokens_mistral': 525, 'n_tokens_neox': 479, 'n_words': 62}