<commit_before><?php

	//
	// If our document root has been moved to a subdirectory of the actual application
	// directory, then we need to find it.
	//
	for (
		//
		// Initial assignment
		//
		$include_directory = 'includes';
		//
		// While Condition
		//
		!is_dir($include_directory);
		//
		// Modifier
		//
		$include_directory = realpath('..' . DIRECTORY_SEPARATOR . $include_directory)
	);
	//
	// Define our application root as the directory containing the includes folder
	//
	define('APPLICATION_ROOT', dirname($include_directory));
	define('MAINTENANCE_FILE', APPLICATION_ROOT . DIRECTORY_SEPARATOR . 'MAINTENANCE');
	//
	// Boostrap!
	//
	require $include_directory . DIRECTORY_SEPARATOR . 'init.php';
	//
	// Check for and include maintenance file if it exists
	//
	if (file_exists(MAINTENANCE_FILE)) {
		include MAINTENANCE_FILE;
		exit(-1);
	}
	//
	// Include our routing logic and run the router.
	//
	require $include_directory . DIRECTORY_SEPARATOR . 'routing.php';
	//
	// Run the router and render its return value
	//
	if (!($data = Moor::run())) {
		try {
			$data = self::render(View::retrieve(View::MASTER));
		} catch (fProgrammerException $e) {}
	}

	if (is_object($data)) {
		switch(strtolower(get_class($data))) {
			case 'view':
				$data->render();
				break;
			case 'ffile':
			case 'fimage':
				$data->output(FALSE);
				break;
			default:
				echo serialize($data);
				break;
		}
	} else {
		echo $data;
	}<commit_msg>fImage and fFile returned and rendered now send the content type header.  These are handled automatically so acceptTypes() becomes purely a filter at the higher level.<commit_after><?php

	//
	// If our document root has been moved to a subdirectory of the actual application
	// directory, then we need to find it.
	//
	for (
		//
		// Initial assignment
		//
		$include_directory = 'includes';
		//
		// While Condition
		//
		!is_dir($include_directory);
		//
		// Modifier
		//
		$include_directory = realpath('..' . DIRECTORY_SEPARATOR . $include_directory)
	);
	//
	// Define our application root as the directory containing the includes folder
	//
	define('APPLICATION_ROOT', dirname($include_directory));
	define('MAINTENANCE_FILE', APPLICATION_ROOT . DIRECTORY_SEPARATOR . 'MAINTENANCE');
	//
	// Boostrap!
	//
	require $include_directory . DIRECTORY_SEPARATOR . 'init.php';
	//
	// Check for and include maintenance file if it exists
	//
	if (file_exists(MAINTENANCE_FILE)) {
		include MAINTENANCE_FILE;
		exit(-1);
	}
	//
	// Include our routing logic and run the router.
	//
	require $include_directory . DIRECTORY_SEPARATOR . 'routing.php';
	//
	// Run the router and render its return value
	//
	if (!($data = Moor::run())) {
		try {
			$data = self::render(View::retrieve(View::MASTER));
		} catch (fProgrammerException $e) {}
	}

	if (is_object($data)) {
		switch(strtolower(get_class($data))) {
			case 'view':
				$data->render();
				break;
			case 'ffile':
			case 'fimage':
				$data->output();
				break;
			default:
				echo serialize($data);
				break;
		}
	} else {
		echo $data;
	}
{'fraction_non_alphanumeric': 0.14159869494290375, 'fraction_numerical': 0.0006525285481239804, 'mean_word_length': 3.1154362416107384, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '3035613', 'n_tokens_mistral': 1128, 'n_tokens_neox': 1022, 'n_words': 265}