* and Joe Geck. * WEBGROUP MEDIA LLC. - Developers of Cerberus Helpdesk */ if (version_compare(PHP_VERSION, "5.2", "<")) { die("Cerberus Helpdesk 5.x requires PHP 5.2 or later."); } require getcwd() . '/framework.config.php'; require DEVBLOCKS_PATH . 'Devblocks.class.php'; // If this is our first run, redirect to the installer if ('' == APP_DB_DRIVER || '' == APP_DB_HOST || '' == APP_DB_DATABASE || null == ($db = DevblocksPlatform::getDatabaseService()) || DevblocksPlatform::isDatabaseEmpty()) { header('Location: ' . dirname($_SERVER['PHP_SELF']) . '/install/index.php'); // [TODO] change this to a meta redirect exit; } require APP_PATH . '/api/Application.class.php'; DevblocksPlatform::init(); DevblocksPlatform::setExtensionDelegate('C4_DevblocksExtensionDelegate'); // Request $request = DevblocksPlatform::readRequest(); // Patches (if not on the patch page) if (@0 != strcasecmp(@$request->path[0], "update") && !DevblocksPlatform::versionConsistencyCheck()) { DevblocksPlatform::redirect(new DevblocksHttpResponse(array('update', 'locked'))); } //DevblocksPlatform::readPlugins(); $session = DevblocksPlatform::getSessionService(); // Localization DevblocksPlatform::setLocale(isset($_SESSION['locale']) && !empty($_SESSION['locale']) ? $_SESSION['locale'] : 'en_US'); if (isset($_SESSION['timezone'])) { @date_default_timezone_set($_SESSION['timezone']); } // Initialize Logging