<commit_before><?php	
	
	require_once "cmsfunctions.php";
	
	//require_once "test_code.php";	
	//load cms config
	if (!Config::parseIniFile(APP_ROOT."/config.ini")){
		throw new Exception("No configuration file found");
	}
	
	$conf = getCmsConfig();
	
	define ("WEB_ROOT",String::slash($conf['WEB_ROOT']));
	define ("SITE_NAME",$conf['SITE_NAME']);
	define ("SITE_SLOGAN",$conf['SITE_SLOGAN']);	
	define ("DEFAULT_PAGE",$conf['DEFAULT_PAGE']);
	
	//load all hooks
	foreach (glob(APP_ROOT."/plugins/*.php") as $file) {
		require_once $file;
	}
	
	//load menus
	require_once(APP_ROOT."/data/menus.php");
	
	//register shutdown function
	register_shutdown_function("sessionEnd");
	
	Session::getInstance()->start();
	
	//launch session start event
	EventManager::getInstance()->getEvent("sessionStart")->raise();	
	
	function sessionEnd() {		
		EventManager::getInstance()->getEvent("sessionEnd")->raise();
	}


?><commit_msg>Fixed plugin system<commit_after><?php	
	
	require_once "cmsfunctions.php";
	
	//require_once "test_code.php";	
	//load cms config
	if (!Config::parseIniFile(APP_ROOT."/config.ini")){
		throw new Exception("No configuration file found");
	}
	
	$conf = getCmsConfig();
	
	define ("WEB_ROOT",String::slash($conf['WEB_ROOT']));
	define ("SITE_NAME",$conf['SITE_NAME']);
	define ("SITE_SLOGAN",$conf['SITE_SLOGAN']);	
	define ("DEFAULT_PAGE",$conf['DEFAULT_PAGE']);
	
	//load all hooks
	$plugins = glob(APP_ROOT."/plugins/*.php");
	if ($plugins)
		foreach ($plugins as $file) {
			require_once $file;
		}
	
	//load menus
	require_once(APP_ROOT."/data/menus.php");
	
	//register shutdown function
	register_shutdown_function("sessionEnd");
	
	Session::getInstance()->start();
	
	//launch session start event
	EventManager::getInstance()->getEvent("sessionStart")->raise();	
	
	function sessionEnd() {		
		EventManager::getInstance()->getEvent("sessionEnd")->raise();
	}


?>
{'fraction_non_alphanumeric': 0.18551797040169132, 'fraction_numerical': 0.0, 'mean_word_length': 5.331103678929765, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '759782', 'n_tokens_mistral': 680, 'n_tokens_neox': 622, 'n_words': 108}