Example #1
0
    $zula->loadLib('ugmanager');
    try {
        $uid = $session->identify($_SESSION['auth']['key'], $_SESSION['auth']['for']);
        if ($uid === false) {
            throw new Exception();
        }
    } catch (Exception $e) {
        $uid = $session->identify();
        # Identify as guest for fail safe
    }
}
define('_ACL_ENABLED', (bool) $config->get('acl/enable'));
if (Registry::has('sql')) {
    $acl = $zula->loadLib('acl');
}
Hooks::load();
// Load the main router of the correct type
if ($input->has('get', 'ns') || function_exists('apache_get_modules') && !in_array('mod_rewrite', apache_get_modules())) {
    $router = new Router();
} else {
    $router = new Router($config->get('url_router/type'));
}
Registry::register('router', $router);
/**
 * Microsoft Web App Gallery (Feature #221) support.
 */
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' && file_exists('msInstall.php')) {
    return require 'msInstall.php';
}
/**
 * Configure the dispatcher, then get data from the parsed URL to load; if there is