Example #1
0
define('LC_DIR_BACKUP', LC_DIR_VAR . 'backup' . LC_DS);
define('LC_DIR_DATA', LC_DIR_VAR . 'data' . LC_DS);
define('LC_DIR_TMP', LC_DIR_VAR . 'tmp' . LC_DS);
define('LC_DIR_LOCALE', LC_DIR_VAR . 'locale');
define('LC_DIR_DATACACHE', LC_DIR_VAR . 'datacache');
define('LC_DIR_LOG', LC_DIR_VAR . 'log' . LC_DS);
define('LC_DIR_CACHE_IMAGES', LC_DIR_VAR . 'images' . LC_DS);
define('LC_DIR_SERVICE', LC_DIR_FILES . 'service' . LC_DS);
define('LC_OS_WINDOWS', 'WIN' === strtoupper(substr(PHP_OS, 0, 3)));
// Disabled xdebug coverage for Selenium-based tests [DEVELOPMENT PURPOSE]
if (isset($_COOKIE) && !empty($_COOKIE['no_xdebug_coverage']) && function_exists('xdebug_stop_code_coverage')) {
    @xdebug_stop_code_coverage();
}
// Autoloading routines
require_once LC_DIR_INCLUDES . 'Autoloader.php';
\Includes\Autoloader::registerAll();
// Fire the error if LC is not installed
if (!defined('XLITE_INSTALL_MODE')) {
    \Includes\ErrorHandler::checkIsLCInstalled();
}
// So called "developer" mode. Set it to "false" in production mode!
define('LC_DEVELOPER_MODE', (bool) \Includes\Utils\ConfigParser::getOptions(array('performance', 'developer_mode')));
// Correct error handling mode
ini_set('display_errors', LC_DEVELOPER_MODE);
// Fatal error and exception handlers
register_shutdown_function(array('\\Includes\\ErrorHandler', 'shutdown'));
set_exception_handler(array('\\Includes\\ErrorHandler', 'handleException'));
@umask(00);
require_once LC_DIR_INCLUDES . 'prepend.php';
// Safe mode
if (!defined('XLITE_INSTALL_MODE')) {