<commit_before><?php

if (version_compare(phpversion(), '5.3.3') < 0) {
    die("concrete5 requires PHP 5.3.3+ to run.\n");
}

/**
 * ----------------------------------------------------------------------------
 * Ensure that all subsequent procedural pages are running inside concrete5.
 * ----------------------------------------------------------------------------
 */
defined('C5_EXECUTE') or define('C5_EXECUTE', md5(uniqid()));



/**
 * ----------------------------------------------------------------------------
 * The following constants need to load very early, because they're used
 * if we determine that we have an updated core, and they're also used to
 * determine where we grab our site config file from. So first we load them,
 * then we attempt to load the site config, then we pass through to an updated
 * core, should our site config point to that new core. Only then after that
 * do we continue loading this instance of concrete5.
 * ----------------------------------------------------------------------------
 */
defined('DISPATCHER_FILENAME') or define('DISPATCHER_FILENAME', 'index.php');
defined('DISPATCHER_FILENAME_CORE') or define('DISPATCHER_FILENAME_CORE', 'dispatcher.php');
defined('DIRNAME_APPLICATION') or define('DIRNAME_APPLICATION', 'application');
defined('DIRNAME_UPDATES') or define('DIRNAME_UPDATES', 'updates');
defined('DIRNAME_CORE') or define('DIRNAME_CORE', 'concrete');
defined('DIR_BASE') or define('DIR_BASE', dirname($_SERVER['SCRIPT_FILENAME']));
defined('DIR_APPLICATION') or define('DIR_APPLICATION', DIR_BASE . '/' . DIRNAME_APPLICATION);
defined('DIR_CONFIG_SITE') or define('DIR_CONFIG_SITE', DIR_APPLICATION . '/config');
defined('CONFIG_FILE') or define('CONFIG_FILE', DIR_CONFIG_SITE . '/site.php');



/**
 * ----------------------------------------------------------------------------
 * Developer preview constants.
 * ----------------------------------------------------------------------------
 */
define('ENABLE_MARKETPLACE_SUPPORT', false);
define('ENABLE_APP_NEWS_OVERLAY', false);
define('ENABLE_APP_NEWS', false);



/**
 * ----------------------------------------------------------------------------
 * Now we test to see if we have a valid site configuration file. If not, we're
 * going to need to render install.
 * ----------------------------------------------------------------------------
 */
if (file_exists(CONFIG_FILE)) define('CONFIG_FILE_EXISTS', true) and include(CONFIG_FILE);



/**
 * ----------------------------------------------------------------------------
 * Now that we've had the opportunity to load our config file, we know if we
 * have a DIRNAME_CORE_UPDATED constant, which lives in that file, and which
 * points to another core. If we have this constant, we exit this file
 * immeditely and proceed into the updated core.
 * ----------------------------------------------------------------------------
 */
if (defined('DIRNAME_CORE_UPDATED') && (!defined('APP_UPDATED_PASSTHRU'))) {
    define('APP_UPDATED_PASSTHRU', true);
    if (is_dir(DIR_BASE . '/' . DIRNAME_UPDATES . '/' . DIRNAME_CORE_UPDATED)) {
        require(DIR_BASE . '/' . DIRNAME_UPDATES . '/' . DIRNAME_CORE_UPDATED . '/' . DIRNAME_CORE . '/' . 'dispatcher.php');
    } else if(file_exists(DIRNAME_UPDATES . '/' . DIRNAME_CORE_UPDATED . '/' . DIRNAME_CORE . '/' . 'dispatcher.php')){
        require(DIRNAME_UPDATES . '/' . DIRNAME_CORE_UPDATED . '/' . DIRNAME_CORE . '/' . 'dispatcher.php');
    } else {
        die(sprintf('Invalid "%s" defined. Please remove it from %s.','DIRNAME_CORE_UPDATED', CONFIG_FILE));
    }
    exit;
}



/**
 * ----------------------------------------------------------------------------
 * ## If we're still here, we're proceeding through this concrete directory,
 * and it's time to load the rest of our hard-coded configuration options –
 * the one we don't need a database to tell us about.
 *
 * Namespacing and Autoloading
 * ----------------------------------------------------------------------------
 */
defined('NAMESPACE_SEGMENT_VENDOR') or define('NAMESPACE_SEGMENT_VENDOR', 'Concrete');
defined('NAMESPACE_SEGMENT_APPLICATION') or define('NAMESPACE_SEGMENT_APPLICATION', 'Application');



/**
 * ----------------------------------------------------------------------------
 * Base URL, Relative Directory and URL rewriting
 * ----------------------------------------------------------------------------
 */
defined('REDIRECT_TO_BASE_URL') or define('REDIRECT_TO_BASE_URL', false);
defined('URL_REWRITING_ALL') or define('URL_REWRITING_ALL', false);
if (!defined('BASE_URL')) {
    if(isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on')) {
        define('BASE_URL', 'https://' . $_SERVER['HTTP_HOST']);
    } else if (isset($_SERVER['HTTP_HOST'])) {
        define('BASE_URL', 'http://' . $_SERVER['HTTP_HOST']);
    } else {
        define('BASE_URL', false);
    }
}

if (!defined('DIR_REL')) {
    $pos = stripos($_SERVER['SCRIPT_NAME'], DISPATCHER_FILENAME);
    if($pos > 0) { //we do this because in CLI circumstances (and some random ones) we would end up with index.ph instead of index.php
        $pos = $pos - 1;
    }
    $uri = substr($_SERVER['SCRIPT_NAME'], 0, $pos);
    define('DIR_REL', $uri);
}



/**
 * ----------------------------------------------------------------------------
 * Directory names
 * ----------------------------------------------------------------------------
 */
define('DIRNAME_BLOCKS', 'blocks');
define('DIRNAME_BACKUPS', 'backups');
define('DIRNAME_PAGES', 'single_pages');
define('DIRNAME_VIEWS', 'views');
define('DIRNAME_PACKAGES', 'packages');
define('DIRNAME_MODELS', 'models');
define('DIRNAME_ATTRIBUTES', 'attributes');
define('DIRNAME_AUTHENTICATION', 'authentication');
define('DIRNAME_LIBRARIES', 'libraries');
define('DIRNAME_RESPONSE', 'response');
define('DIRNAME_PERMISSIONS', 'permission');
define('DIRNAME_WORKFLOW', 'workflow');
define('DIRNAME_WORKFLOW_ASSIGNMENTS', 'assignments');
define('DIRNAME_REQUESTS', 'requests');
define('DIRNAME_KEYS', 'keys');
define('DIRNAME_PAGE_TYPES', 'page_types');
define('DIRNAME_PAGE_THEME', 'page_theme');
define('DIRNAME_PAGE_THEME_CUSTOM', 'custom');
define('DIRNAME_ELEMENTS', 'elements');
define('DIRNAME_LANGUAGES', 'languages');
define('DIRNAME_JOBS', 'jobs');
define('DIRNAME_DASHBOARD', 'dashboard');
define('DIRNAME_ELEMENTS_HEADER_MENU', 'header_menu');
define('DIRNAME_DASHBOARD_MODULES', 'modules');
define('DIRNAME_MAIL_TEMPLATES', 'mail');
define('DIRNAME_THEMES', 'themes');
define('DIRNAME_THEMES_CORE', 'core');
define('DIRNAME_TOOLS', 'tools');
define('DIRNAME_BLOCK_TOOLS', 'tools');
define('DIRNAME_BLOCK_TEMPLATES', 'templates');
define('DIRNAME_BLOCK_TEMPLATES_COMPOSER', 'composer');
define('DIRNAME_CSS', 'css');
define('DIRNAME_CLASSES', 'core');
define('DIRNAME_PREVIEW', 'preview');
define('DIRNAME_GROUP', 'group');
define('DIRNAME_GROUP_AUTOMATION', 'automation');
define('DIRNAME_JAVASCRIPT', 'js');
define('DIRNAME_IMAGES', 'images');
define('DIRNAME_HELPERS', 'helpers');
define('DIRNAME_USER_POINTS', 'user_point');
define('DIRNAME_ACTIONS', 'actions');
define('DIRNAME_SYSTEM_TYPES', 'types');<commit_msg>Whoops<commit_after><?php

if (version_compare(phpversion(), '5.3.3') < 0) {
    die("concrete5 requires PHP 5.3.3+ to run.\n");
}

/**
 * ----------------------------------------------------------------------------
 * Ensure that all subsequent procedural pages are running inside concrete5.
 * ----------------------------------------------------------------------------
 */
defined('C5_EXECUTE') or define('C5_EXECUTE', md5(uniqid()));



/**
 * ----------------------------------------------------------------------------
 * The following constants need to load very early, because they're used
 * if we determine that we have an updated core, and they're also used to
 * determine where we grab our site config file from. So first we load them,
 * then we attempt to load the site config, then we pass through to an updated
 * core, should our site config point to that new core. Only then after that
 * do we continue loading this instance of concrete5.
 * ----------------------------------------------------------------------------
 */
defined('DISPATCHER_FILENAME') or define('DISPATCHER_FILENAME', 'index.php');
defined('DISPATCHER_FILENAME_CORE') or define('DISPATCHER_FILENAME_CORE', 'dispatcher.php');
defined('DIRNAME_APPLICATION') or define('DIRNAME_APPLICATION', 'application');
defined('DIRNAME_UPDATES') or define('DIRNAME_UPDATES', 'updates');
defined('DIRNAME_CORE') or define('DIRNAME_CORE', 'concrete');
defined('DIR_BASE') or define('DIR_BASE', dirname($_SERVER['SCRIPT_FILENAME']));
defined('DIR_APPLICATION') or define('DIR_APPLICATION', DIR_BASE . '/' . DIRNAME_APPLICATION);
defined('DIR_CONFIG_SITE') or define('DIR_CONFIG_SITE', DIR_APPLICATION . '/config');
defined('CONFIG_FILE') or define('CONFIG_FILE', DIR_CONFIG_SITE . '/site.php');



/**
 * ----------------------------------------------------------------------------
 * Developer preview constants.
 * ----------------------------------------------------------------------------
 */
define('ENABLE_MARKETPLACE_SUPPORT', false);
define('ENABLE_APP_NEWS_OVERLAY', false);
define('ENABLE_APP_NEWS', false);



/**
 * ----------------------------------------------------------------------------
 * Now we test to see if we have a valid site configuration file. If not, we're
 * going to need to render install.
 * ----------------------------------------------------------------------------
 */
if (file_exists(CONFIG_FILE)) define('CONFIG_FILE_EXISTS', true) and include(CONFIG_FILE);



/**
 * ----------------------------------------------------------------------------
 * Now that we've had the opportunity to load our config file, we know if we
 * have a DIRNAME_CORE_UPDATED constant, which lives in that file, and which
 * points to another core. If we have this constant, we exit this file
 * immeditely and proceed into the updated core.
 * ----------------------------------------------------------------------------
 */
if (defined('DIRNAME_CORE_UPDATED') && (!defined('APP_UPDATED_PASSTHRU'))) {
    define('APP_UPDATED_PASSTHRU', true);
    if (is_dir(DIR_BASE . '/' . DIRNAME_UPDATES . '/' . DIRNAME_CORE_UPDATED)) {
        require(DIR_BASE . '/' . DIRNAME_UPDATES . '/' . DIRNAME_CORE_UPDATED . '/' . DIRNAME_CORE . '/' . 'dispatcher.php');
    } else if(file_exists(DIRNAME_UPDATES . '/' . DIRNAME_CORE_UPDATED . '/' . DIRNAME_CORE . '/' . 'dispatcher.php')){
        require(DIRNAME_UPDATES . '/' . DIRNAME_CORE_UPDATED . '/' . DIRNAME_CORE . '/' . 'dispatcher.php');
    } else {
        die(sprintf('Invalid "%s" defined. Please remove it from %s.','DIRNAME_CORE_UPDATED', CONFIG_FILE));
    }
    exit;
}



/**
 * ----------------------------------------------------------------------------
 * ## If we're still here, we're proceeding through this concrete directory,
 * and it's time to load the rest of our hard-coded configuration options –
 * the one we don't need a database to tell us about.
 *
 * Namespacing and Autoloading
 * ----------------------------------------------------------------------------
 */
defined('NAMESPACE_SEGMENT_VENDOR') or define('NAMESPACE_SEGMENT_VENDOR', 'Concrete');
defined('NAMESPACE_SEGMENT_APPLICATION') or define('NAMESPACE_SEGMENT_APPLICATION', 'Application');



/**
 * ----------------------------------------------------------------------------
 * Base URL, Relative Directory and URL rewriting
 * ----------------------------------------------------------------------------
 */
defined('REDIRECT_TO_BASE_URL') or define('REDIRECT_TO_BASE_URL', false);
defined('URL_REWRITING_ALL') or define('URL_REWRITING_ALL', false);
if (!defined('BASE_URL')) {
    if(isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on')) {
        define('BASE_URL', 'https://' . $_SERVER['HTTP_HOST']);
    } else if (isset($_SERVER['HTTP_HOST'])) {
        define('BASE_URL', 'http://' . $_SERVER['HTTP_HOST']);
    } else {
        define('BASE_URL', false);
    }
}

if (!defined('DIR_REL')) {
    $pos = stripos($_SERVER['SCRIPT_NAME'], DISPATCHER_FILENAME);
    if($pos > 0) { //we do this because in CLI circumstances (and some random ones) we would end up with index.ph instead of index.php
        $pos = $pos - 1;
    }
    $uri = substr($_SERVER['SCRIPT_NAME'], 0, $pos);
    define('DIR_REL', $uri);
}



/**
 * ----------------------------------------------------------------------------
 * Directory names
 * ----------------------------------------------------------------------------
 */
define('DIRNAME_BLOCKS', 'blocks');
define('DIRNAME_BACKUPS', 'backups');
define('DIRNAME_PAGES', 'single_pages');
define('DIRNAME_VIEWS', 'views');
define('DIRNAME_PACKAGES', 'packages');
define('DIRNAME_MODELS', 'models');
define('DIRNAME_ATTRIBUTES', 'attributes');
define('DIRNAME_AUTHENTICATION', 'authentication');
define('DIRNAME_LIBRARIES', 'libraries');
define('DIRNAME_RESPONSE', 'response');
define('DIRNAME_PERMISSIONS', 'permission');
define('DIRNAME_WORKFLOW', 'workflow');
define('DIRNAME_WORKFLOW_ASSIGNMENTS', 'assignments');
define('DIRNAME_REQUESTS', 'requests');
define('DIRNAME_KEYS', 'keys');
define('DIRNAME_PAGE_TYPES', 'page_types');
define('DIRNAME_PAGE_THEME', 'page_theme');
define('DIRNAME_PAGE_THEME_CUSTOM', 'custom');
define('DIRNAME_ELEMENTS', 'elements');
define('DIRNAME_LANGUAGES', 'languages');
define('DIRNAME_JOBS', 'jobs');
define('DIRNAME_DASHBOARD', 'dashboard');
define('DIRNAME_ELEMENTS_HEADER_MENU', 'header_menu');
define('DIRNAME_DASHBOARD_MODULES', 'modules');
define('DIRNAME_MAIL_TEMPLATES', 'mail');
define('DIRNAME_THEMES', 'themes');
define('DIRNAME_THEMES_CORE', 'core');
define('DIRNAME_TOOLS', 'tools');
define('DIRNAME_BLOCK_TOOLS', 'tools');
define('DIRNAME_BLOCK_TEMPLATES', 'templates');
define('DIRNAME_BLOCK_TEMPLATES_COMPOSER', 'composer');
define('DIRNAME_CSS', 'css');
define('DIRNAME_CLASSES', 'src');
define('DIRNAME_PREVIEW', 'preview');
define('DIRNAME_GROUP', 'group');
define('DIRNAME_GROUP_AUTOMATION', 'automation');
define('DIRNAME_JAVASCRIPT', 'js');
define('DIRNAME_IMAGES', 'images');
define('DIRNAME_HELPERS', 'helpers');
define('DIRNAME_USER_POINTS', 'user_point');
define('DIRNAME_ACTIONS', 'actions');
define('DIRNAME_SYSTEM_TYPES', 'types');
{'fraction_non_alphanumeric': 0.30417772809836524, 'fraction_numerical': 0.0022355735643426015, 'mean_word_length': 2.410769597331427, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4315972', 'n_tokens_mistral': 4086, 'n_tokens_neox': 3971, 'n_words': 911}