* Domain Path: /language */ $ai1ec_base_dir = dirname(__FILE__); $ai1ec_base_url = plugins_url('', __FILE__); $ai1ec_config_path = $ai1ec_base_dir . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR; // Include configuration files and initiate global constants as they are used // By the error/exception handler too. foreach (array('constants-local.php', 'constants.php') as $file) { if (is_file($ai1ec_config_path . $file)) { require_once $ai1ec_config_path . $file; } } if (!function_exists('ai1ec_initiate_constants')) { throw new Ai1ec_Exception('No constant file was found.'); } ai1ec_initiate_constants($ai1ec_base_dir, $ai1ec_base_url); require $ai1ec_base_dir . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'exception' . DIRECTORY_SEPARATOR . 'ai1ec.php'; require $ai1ec_base_dir . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'exception' . DIRECTORY_SEPARATOR . 'error.php'; require $ai1ec_base_dir . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'exception' . DIRECTORY_SEPARATOR . 'handler.php'; require $ai1ec_base_dir . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'http' . DIRECTORY_SEPARATOR . 'response' . DIRECTORY_SEPARATOR . 'helper.php'; $ai1ec_exception_handler = new Ai1ec_Exception_Handler('Ai1ec_Exception', 'Ai1ec_Error_Exception'); // if the user clicked the link to reactivate the plugin if (isset($_GET[Ai1ec_Exception_Handler::DB_REACTIVATE_PLUGIN])) { $ai1ec_exception_handler->reactivate_plugin(); } $soft_disable_message = $ai1ec_exception_handler->get_disabled_message(); if (false !== $soft_disable_message) { return $ai1ec_exception_handler->show_notices($soft_disable_message); } $prev_er_handler = set_error_handler(array($ai1ec_exception_handler, 'handle_error')); $prev_ex_handler = set_exception_handler(array($ai1ec_exception_handler, 'handle_exception'));
define('DOING_AJAX', true); } } /** * Include configuration files and define constants */ $ai1ec_base_path = dirname(__FILE__); foreach (array('constants-local.php', 'constants.php') as $file) { if (file_exists($ai1ec_base_path . DIRECTORY_SEPARATOR . $file)) { include_once $ai1ec_base_path . DIRECTORY_SEPARATOR . $file; } } if (!function_exists('ai1ec_initiate_constants')) { return trigger_error('File \'constants.php\' defining \'ai1ec_initiate_constants\' function must be present.', E_USER_WARNING); } ai1ec_initiate_constants(); require_once AI1EC_LIB_PATH . DIRECTORY_SEPARATOR . 'global-functions.php'; require_once AI1EC_LIB_PATH . DIRECTORY_SEPARATOR . 'class-ai1ec-loader.php'; @ini_set('unserialize_callback_func', 'spl_autoload_call'); spl_autoload_register('Ai1ec_Loader::autoload'); global $ai1ec_log4php_config; $ai1ec_log4php_config = (include AI1EC_PATH . DIRECTORY_SEPARATOR . 'log4php-config.php'); if (!AI1EC_DEBUG) { foreach ($ai1ec_log4php_config['appenders'] as &$appender) { if (!isset($appender['filters'])) { $appender['filters'] = array(); } $appender['filters'][] = array('class' => 'LoggerFilterLevelRange', 'params' => array('levelMin' => 'warn')); } unset($appender); }