/**
  * Final call
  *
  * @return void
  */
 static function end()
 {
     CMbPerformance::mark("app");
     self::$dbTime = CApp::$performance["dataSourceTime"];
 }
Example #2
0
    $user->getBasicInfo();
    CAppUI::$user = $user;
    CAppUI::$instance->_ref_user =& CAppUI::$user;
    CApp::$is_robot = CAppUI::$user->isRobot();
    // Offline mode for non-admins
    if ($dPconfig["offline_non_admin"] && CAppUI::$user->_id != 0 && !CAppUI::$user->isAdmin()) {
        CApp::goOffline("maintenance");
    }
}
CMbPerformance::mark("user");
// Load DB-stored configuration schema
$configurations = glob(__DIR__ . "/modules/*/configuration.php");
foreach ($configurations as $_configuration) {
    include $_configuration;
}
CMbPerformance::mark("config");
// Init output filter
CHTMLResourceLoader::initOutput(CValue::get("_aio"));
CApp::notify("BeforeMain");
// Check if the mobile feature is available and if the user agent is a mobile
$enable_mobile_ui = CAppUI::pref("MobileUI") || !CAppUI::$instance->user_id;
if (is_file(__DIR__ . "/mobile/main.php") && !empty($_SESSION["browser"]["mobile"]) && $enable_mobile_ui) {
    CAppUI::$mobile = true;
    include __DIR__ . "/mobile/main.php";
} else {
    include __DIR__ . "/includes/main.php";
}
CView::disableSlave();
CApp::notify("AfterMain");
// Send timing data in HTTP header
CMbPerformance::end();