Exemple #1
0
if (expJavascript::inAjaxAction()) {
    set_error_handler('handleErrors');
}
// Validate the session and populate the $user variable
if ($db->havedb) {
    $user = new user();
    expSession::validate();
}
/* exdoc
 * The flag to use a mobile theme variation.
 */
if (!defined('MOBILE')) {
    if (defined('FORCE_MOBILE') && FORCE_MOBILE && $user->isAdmin()) {
        define('MOBILE', true);
    } else {
        define('MOBILE', expTheme::is_mobile());
    }
}
// Initialize permissions variables
$exponent_permissions_r = expSession::get("permissions");
// initialize the expRouter
$router = new expRouter();
// Initialize the navigation hierarchy
if ($db->havedb) {
    $sections = expCore::initializeNavigation();
}
/**
 * dumps the passed variable to screen, but only if in development mode
 * @param  $var the variable to dump
 * @param bool $halt if set to true will halt execution
 * @return void