<commit_before><?php defined('SYSPATH') or die('No direct script access.');

class Controller_Page_Projects_Tracker extends Abstract_Controller_Hyla_Page {

	public function action_list()
	{
		$this->view
			->bind('project', $project);

		$project = Couch_Model::factory('project', $this->couchdb)
			->find_by_slug($this->request->param('slug'));

		if ( ! $project->loaded())
			throw new HTTP_Exception_404;
	}

	public function action_new()
	{
		$this->view
			->bind('project', $project)
			->bind('ticket', $ticket)
			->bind('values', $values)
			->bind('errors', $errors);

		$project = Couch_Model::factory('project', $this->couchdb)
			->find_by_slug($this->request->param('slug'));

		if ( ! $project->loaded())
			throw new HTTP_Exception_404;

		if ($this->request->post())
		{
			$values = $this->request->post();

			try
			{
				$ticket = Couch_Model::factory('ticket');
				$ticket->values($values, array('title', 'description'));
				$ticket->create();
			}
			catch (Validation_Exception $e)
			{
				$errors = $e->array->errors('validation');
			}
		}
	}
}<commit_msg>fixing tracker/new<commit_after><?php defined('SYSPATH') or die('No direct script access.');

class Controller_Page_Projects_Tracker extends Abstract_Controller_Hyla_Page {

	public function action_list()
	{
		$this->view
			->bind('project', $project);

		$project = Couch_Model::factory('project', $this->couchdb)
			->find_by_slug($this->request->param('slug'));

		if ( ! $project->loaded())
			throw new HTTP_Exception_404;
	}

	public function action_new()
	{
		$this->view
			->bind('project', $project)
			->bind('ticket', $ticket)
			->bind('values', $values)
			->bind('errors', $errors);

		$project = Couch_Model::factory('project', $this->couchdb)
			->find_by_slug($this->request->param('slug'));

		if ( ! $project->loaded())
			throw new HTTP_Exception_404;

		if ($this->request->post())
		{
			$values = $this->request->post();

			try
			{
				$ticket = Couch_Model::factory('ticket', $this->couchdb);
				$ticket->values($values, array('title', 'description'));
				$ticket->create();

				$this->request->redirect(Route::url('hyla-tracker', array(
					'slug' => $project->get('slug'),
				)));
			}
			catch (Validation_Exception $e)
			{
				$errors = $e->array->errors('validation');
			}
		}
	}
}
{'fraction_non_alphanumeric': 0.19956709956709956, 'fraction_numerical': 0.005194805194805195, 'mean_word_length': 4.240362811791384, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 58, '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': '1088035', 'n_tokens_mistral': 915, 'n_tokens_neox': 773, 'n_words': 132}