Beispiel #1
0
    $app->schema->registerJS("user", "widget-users.js");
    // Groups JS
    $app->schema->registerJS("group", "widget-groups.js");
}, 1);
/* TODO: enable Twig caching?
$view = $app->view();
$view->parserOptions = array(
    'debug' => true,
    'cache' => dirname(__FILE__) . '/cache'
);
*/
/** Plugins */
$app->hook('plugins.register', function () use($app) {
    // Run initialization scripts for plugins
    $var_plugins = $app->site->getPlugins();
    foreach ($var_plugins as $var_plugin) {
        require_once $app->config('plugins.path') . "/" . $var_plugin . "/config-plugin.php";
    }
});
// Hook for core and plugins to register includes
$app->applyHook("includes.css.register");
$app->applyHook("includes.js.register");
// Register plugins
$app->applyHook("plugins.register");
if ($db_error) {
    // In case the error is because someone is trying to reinstall with new db info while still logged in, log them out
    session_destroy();
    $controller = new \UserFrosting\BaseController($app);
    $controller->pageDatabaseError();
    exit;
}