<commit_before><?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Teams extends CI_Controller {


	public function __construct() {
		parent::__construct();
	}


	public function create_team() {
		
		if ($_SERVER['REQUEST_METHOD'] == 'POST'){
			$team_details = [
				'name' => $this->input->post('name'),
				'users_id' => $this->session->user[0]->id
			];
			$this->team_model->add_team($team_details);

			redirect('tasks/teams');
		}
	}


	public function index() { #this view is for testing
		$data['teams'] = $this->team_model->get();
		$data['tasks'] = $this->task_model->get(1);
		$data['team_tasks'] = $this->task_model->get_team_tasks(1);
		$data['status'] = 1;
		$this->load->view('header', $data);		
		$this->load->view('test/index', $data);
		$this->load->view('task/index', $data);
	}


	public function add_mates() {
		
		if ($_SERVER['REQUEST_METHOD'] == 'POST'){
			$peers = [];
			$peers = $this->input->post('peers'); #must get array from post
			$team_details = [
				'teams_id' => $this->input->post('team_id'),
				'peers' => $peers
			];

			$this->team_model->add_peers($team_details);
			redirect('tasks/teams');
		}
	}
}
<commit_msg>Fix Redirect<commit_after><?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Teams extends CI_Controller {


	public function __construct() {
		parent::__construct();
	}


	public function create_team() {
		
		if ($_SERVER['REQUEST_METHOD'] == 'POST'){
			$team_details = [
				'name' => $this->input->post('name'),
				'users_id' => $this->session->user[0]->id
			];
			$this->team_model->add_team($team_details);

			redirect('teams');
		}
	}


	public function index() { #this view is for testing
		$data['teams'] = $this->team_model->get();
		$data['tasks'] = $this->task_model->get(1);
		$data['team_tasks'] = $this->task_model->get_team_tasks(1);
		$data['status'] = 1;
		$this->load->view('header', $data);		
		$this->load->view('test/index', $data);
		$this->load->view('task/index', $data);
	}


	public function add_mates() {
		
		if ($_SERVER['REQUEST_METHOD'] == 'POST'){
			$peers = [];
			$peers = $this->input->post('peers'); #must get array from post
			$team_details = [
				'teams_id' => $this->input->post('team_id'),
				'peers' => $peers
			];

			$this->team_model->add_peers($team_details);
			redirect('teams');
		}
	}
}

{'fraction_non_alphanumeric': 0.21571125265392782, 'fraction_numerical': 0.003397027600849257, 'mean_word_length': 4.14410480349345, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 61, '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': '5504460', 'n_tokens_mistral': 963, 'n_tokens_neox': 836, 'n_words': 145}