<commit_before><?php

abstract class ApplicationController extends BaseController {

	function __construct() {
		$this['title'] = 'Site Title';

		$this['actions'] = array(
			'Home' => site_url()
		);
		
		$current_controller = str_replace('Controller', '', get_class($this));
		
		if('Index' == $current_controller){
			$this['current_page'] = 'Home';
		} else {
			$this['current_page'] = StringFormat::titleCase($current_controller, ' ');
		}
		
		foreach (glob(dirname(__FILE__) . '/*.php') as $controller_file) {
			$controller = str_replace('Controller.php', '', basename($controller_file));
			if ($controller == 'Application' || $controller == 'Index' || $controller == 'Generator')
				continue;
			$this['actions'][StringFormat::titleCase($controller, ' ')] = site_url(StringFormat::url($controller));
		}
	}

}<commit_msg>don't include list of actions if output format isn't html<commit_after><?php

abstract class ApplicationController extends BaseController {

	function __construct() {
		if($this->outputFormat != 'html') {
			return;
		}
		
		$this['title'] = 'Site Title';

		$this['actions'] = array(
			'Home' => site_url()
		);
		
		$current_controller = str_replace('Controller', '', get_class($this));
		
		if('Index' == $current_controller){
			$this['current_page'] = 'Home';
		} else {
			$this['current_page'] = StringFormat::titleCase($current_controller, ' ');
		}
		
		foreach (glob(dirname(__FILE__) . '/*.php') as $controller_file) {
			$controller = str_replace('Controller.php', '', basename($controller_file));
			if ($controller == 'Application' || $controller == 'Index')
				continue;
			$this['actions'][StringFormat::titleCase($controller, ' ')] = site_url(StringFormat::url($controller));
		}
	}

}
{'fraction_non_alphanumeric': 0.18814729574223246, 'fraction_numerical': 0.0, 'mean_word_length': 5.059233449477352, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '1672102', 'n_tokens_mistral': 598, 'n_tokens_neox': 521, 'n_words': 96}