Example #1
0
import('security.Validation');
import('session.SessionManager');
import('template.TemplateManager');
import('submission.common.Action');
import('help.Help');
import('plugins.PluginRegistry');
import('plugins.HookRegistry');
/**
 * System initialization (post-classloading).
 */
// Initialize string wrapper library
String::init();
if (Request::isCacheable()) {
    // Can we serve a cached response?
    if (Config::getVar('cache', 'web_cache')) {
        if (Request::displayCached()) {
            exit;
        }
        // Success
        ob_start(array('Request', 'cacheContent'));
    }
} else {
    // Is this a pre-fetch that we want to prevent?
    if (isset($_SERVER['HTTP_X_MOZ']) && $_SERVER['HTTP_X_MOZ'] == 'prefetch') {
        header('HTTP/1.0 403 Forbidden');
        echo '403: Forbidden<br><br>Pre-fetching not allowed.';
        exit;
    }
}
// Load the main locale file
Locale::initialize();