function dropCache() { if (DEVELOPMENT_MODE && browserNoCache()) { return true; } else { return false; } }
register_shutdown_function("shutdown"); set_exception_handler("send_http_error"); } //clean disconnect handling register_shutdown_function(function () { if (isset($GLOBALS["STEAM"])) { $GLOBALS["STEAM"]->disconnect(); } }); /* * setup autoloader */ require_once PATH_DEPENDING . "classes/autoloader/Autoloader.php"; Autoloader::getRegisteredAutoloader()->remove(); $autoloaderIndexFile = PATH_TEMP . "koala_autoloader.gz"; if (DEVELOPMENT_MODE && browserNoCache() && !isAjaxRequest() && !isPhpCli()) { if (file_exists($autoloaderIndexFile)) { unlink($autoloaderIndexFile); } } if (dropCache() && !isAjaxRequest()) { emptyCacheFolder(); } $autoloader = new Autoloader(PATH_BASE); $autoloader->register(); $autoloader->getIndex()->setIndexPath($autoloaderIndexFile); $autoloader->getFileIterator()->setOnlyDirPattern("~/((core)|(depending)|(extensions))~"); $autoloader->getFileIterator()->setOnlyFilePattern("~\\.php\$~i"); $autoloader->getFileIterator()->addSkipDirPattern("~/((javascript)|(\\.settings)|(\\.todo)|(cache)|(log)|(temp))~"); $autoloader->getFileIterator()->addSkipFilePattern("~/\\.~"); if (apache_getenv("AUTOLOADER_BUILD_RUNNING")) {