<commit_before><?php
error_reporting(E_ALL|E_STRICT);
date_default_timezone_set('Europe/London');

set_include_path('.' . PATH_SEPARATOR . './library/'
	 . PATH_SEPARATOR . './application/models'
	 . get_include_path());
include "Zend.php";

Zend::loadClass('Zend_Controller_Front');
Zend::loadClass('Zend_Controller_RewriteRouter');
Zend::loadClass('Zend_View');
Zend::loadClass('Zend_Config_Ini');
Zend::loadClass('Zend_Db');
Zend::loadClass('Zend_Db_Table');
Zend::loadClass('Zend_Filter_Input');

// register the input filters
Zend::register('post', new Zend_Filter_Input($_POST));
Zend::register('get', new Zend_Filter_Input($_GET));

// load configuration
$config = new Zend_Config_Ini('./application/config.ini', 'general');
Zend::register('config', $config);

// setup database
$db = Zend_Db::factory($config->db->adapter, $config->db->config->asArray());
Zend_Db_Table::setDefaultAdapter($db);

// register the view we are going to use
$view = new Zend_View();
$view->setScriptPath('./application/views');
Zend::register('view', $view);

// setup controller
$router = new Zend_Controller_RewriteRouter();
$baseUrl = substr($_SERVER['PHP_SELF'], 0, 
        strpos($_SERVER['PHP_SELF'], '/index.php'));
$router->setRewriteBase($baseUrl);
$controller = Zend_Controller_Front::getInstance();
$controller->setRouter($router);
$controller->setControllerDirectory('./application/controllers');
// run!
$controller->dispatch(); 
<commit_msg>Update to support Zend Framework 0.6.<commit_after><?php
error_reporting(E_ALL|E_STRICT);
date_default_timezone_set('Europe/London');

set_include_path('.' . PATH_SEPARATOR . './library/'
	 . PATH_SEPARATOR . './application/models'
	 . get_include_path());
include "Zend.php";

Zend::loadClass('Zend_Controller_Front');
Zend::loadClass('Zend_View');
Zend::loadClass('Zend_Config_Ini');
Zend::loadClass('Zend_Db');
Zend::loadClass('Zend_Db_Table');
Zend::loadClass('Zend_Filter_Input');

// register the input filters
Zend::register('post', new Zend_Filter_Input($_POST, false));
Zend::register('get', new Zend_Filter_Input($_GET, false));

// load configuration
$config = new Zend_Config_Ini('./application/config.ini', 'general');
Zend::register('config', $config);

// setup database
$db = Zend_Db::factory($config->db->adapter, $config->db->config->asArray());
Zend_Db_Table::setDefaultAdapter($db);

// register the view we are going to use
$view = new Zend_View();
$view->setScriptPath('./application/views');
Zend::register('view', $view);

// setup controller
$baseUrl = substr($_SERVER['PHP_SELF'], 0, 
        strpos($_SERVER['PHP_SELF'], '/index.php'));     
$frontController = Zend_Controller_Front::getInstance();
$frontController->setBaseUrl($baseUrl);
$frontController->setControllerDirectory('./application/controllers');
$frontController->throwExceptions(true);

// run!
$frontController->dispatch();

{'fraction_non_alphanumeric': 0.17950458092975907, 'fraction_numerical': 0.0013573125212080082, 'mean_word_length': 6.103614457831325, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '848706', 'n_tokens_mistral': 971, 'n_tokens_neox': 954, 'n_words': 149}