<commit_before><?php
/**
 * Jazzee Bootstrap
 * Defines usefull constants
 * Sets up LVC, Foundation, Theme
 * @author <NAME> <<EMAIL>>
 * @license http://jazzee.org/license.txt
 * @package jazzee
 */
define('SRC_ROOT', realpath(dirname(__FILE__) . '/..'));
define('APP_ROOT', SRC_ROOT . '/app');
define('WWW_ROOT',rtrim(dirname($_SERVER['SCRIPT_NAME']),'/\\.')); //strip any slashes and if this is the root directory a period (.) is possible
require_once(SRC_ROOT . '/lib/foundation/bootstrap.php');

Autoload::addAutoLoadPath(APP_ROOT . '/classes/');
Autoload::addAutoLoadPath(APP_ROOT . '/models/');

//Setup the Lvc options
Lvc_Config::addControllerPath(APP_ROOT . '/controllers/');
Lvc_Config::addControllerViewPath(APP_ROOT . '/views/');
Lvc_Config::addLayoutViewPath(APP_ROOT . '/views/layouts/');
Lvc_Config::addElementViewPath(APP_ROOT . '/views/elements/');

Lvc_Config::addElementViewPath(SRC_ROOT . '/lib/foundation/classes/forms/lvc_elements/');
Lvc_Config::addElementViewPath(SRC_ROOT . '/lib/foundation/classes/navigation/lvc_elements/');
Lvc_Config::addElementViewPath(SRC_ROOT . '/lib/foundation/classes/lvc_elements/');

//Load apply controllers and views
Lvc_Config::addControllerPath(APP_ROOT . '/controllers/apply/');
Lvc_Config::addControllerViewPath(APP_ROOT . '/views/apply/');

//Load admin controllers and views
Lvc_Config::addControllerPath(APP_ROOT . '/controllers/admin/');
Lvc_Config::addControllerViewPath(APP_ROOT . '/views/admin/');

//Load manage controllers and views
Lvc_Config::addControllerPath(APP_ROOT . '/controllers/manage/');
Lvc_Config::addControllerViewPath(APP_ROOT . '/views/manage/');

//Load setup controllers and views
Lvc_Config::addControllerPath(APP_ROOT . '/controllers/setup/');
Lvc_Config::addControllerViewPath(APP_ROOT . '/views/setup/');

//Load applicants controllers and views
Lvc_Config::addControllerPath(APP_ROOT . '/controllers/applicants/');
Lvc_Config::addControllerViewPath(APP_ROOT . '/views/applicants/');

Lvc_Config::setViewClassName('JazzeeView');
Lvc_Config::setDefaultControllerName('apply_welcome');
Lvc_Config::setDefaultControllerActionName('index');

//loading default scripts and theme scripts.
Resource::getInstance()->addDirectory(APP_ROOT . '/common/scripts', 'common/scripts/', false);
Resource::getInstance()->addDirectory(APP_ROOT . '/common/styles', 'common/styles/', false);


//Allow everything to be overridden
//load configuration file
$c = new Config;
$root = $c->parseConfig(SRC_ROOT . '/etc/config.ini.php', 'INICommented'); 
if (!PEAR::isError($root)) {
  $arr = $root->toArray();
  if(isset($arr['root']['system']['overridePath'])){<commit_msg>Load the app/common/media directory as a public resource.<commit_after><?php
/**
 * Jazzee Bootstrap
 * Defines usefull constants
 * Sets up LVC, Foundation, Theme
 * @author <NAME> <<EMAIL>>
 * @license http://jazzee.org/license.txt
 * @package jazzee
 */
define('SRC_ROOT', realpath(dirname(__FILE__) . '/..'));
define('APP_ROOT', SRC_ROOT . '/app');
define('WWW_ROOT',rtrim(dirname($_SERVER['SCRIPT_NAME']),'/\\.')); //strip any slashes and if this is the root directory a period (.) is possible
require_once(SRC_ROOT . '/lib/foundation/bootstrap.php');

Autoload::addAutoLoadPath(APP_ROOT . '/classes/');
Autoload::addAutoLoadPath(APP_ROOT . '/models/');

//Setup the Lvc options
Lvc_Config::addControllerPath(APP_ROOT . '/controllers/');
Lvc_Config::addControllerViewPath(APP_ROOT . '/views/');
Lvc_Config::addLayoutViewPath(APP_ROOT . '/views/layouts/');
Lvc_Config::addElementViewPath(APP_ROOT . '/views/elements/');

Lvc_Config::addElementViewPath(SRC_ROOT . '/lib/foundation/classes/forms/lvc_elements/');
Lvc_Config::addElementViewPath(SRC_ROOT . '/lib/foundation/classes/navigation/lvc_elements/');
Lvc_Config::addElementViewPath(SRC_ROOT . '/lib/foundation/classes/lvc_elements/');

//Load apply controllers and views
Lvc_Config::addControllerPath(APP_ROOT . '/controllers/apply/');
Lvc_Config::addControllerViewPath(APP_ROOT . '/views/apply/');

//Load admin controllers and views
Lvc_Config::addControllerPath(APP_ROOT . '/controllers/admin/');
Lvc_Config::addControllerViewPath(APP_ROOT . '/views/admin/');

//Load manage controllers and views
Lvc_Config::addControllerPath(APP_ROOT . '/controllers/manage/');
Lvc_Config::addControllerViewPath(APP_ROOT . '/views/manage/');

//Load setup controllers and views
Lvc_Config::addControllerPath(APP_ROOT . '/controllers/setup/');
Lvc_Config::addControllerViewPath(APP_ROOT . '/views/setup/');

//Load applicants controllers and views
Lvc_Config::addControllerPath(APP_ROOT . '/controllers/applicants/');
Lvc_Config::addControllerViewPath(APP_ROOT . '/views/applicants/');

Lvc_Config::setViewClassName('JazzeeView');
Lvc_Config::setDefaultControllerName('apply_welcome');
Lvc_Config::setDefaultControllerActionName('index');

//loading common scripts, themes, and styles
Resource::getInstance()->addDirectory(APP_ROOT . '/common/scripts', 'common/scripts/', true);
Resource::getInstance()->addDirectory(APP_ROOT . '/common/styles', 'common/styles/', true);
Resource::getInstance()->addDirectory(APP_ROOT . '/common/media', 'common/media/', true);


//Allow everything to be overridden
//load configuration file
$c = new Config;
$root = $c->parseConfig(SRC_ROOT . '/etc/config.ini.php', 'INICommented'); 
if (!PEAR::isError($root)) {
  $arr = $root->toArray();
  if(isset($arr['root']['system']['overridePath'])){
{'fraction_non_alphanumeric': 0.1688839615668884, 'fraction_numerical': 0.0, 'mean_word_length': 6.528511821974965, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 18, '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': '608431', 'n_tokens_mistral': 1736, 'n_tokens_neox': 1697, 'n_words': 298}