#start session session_start(); define('URL',rtrim((Bootstrap::https()?'https':'http').'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']),'setup')); #define paths define('INC_DIR',dirname(__file__).'/inc/'); //local include dir! #required files require_once(INCLUDE_DIR.'class.setup.php'); require_once(INCLUDE_DIR.'class.validator.php'); require_once(INCLUDE_DIR.'class.passwd.php'); require_once(INCLUDE_DIR.'class.format.php'); require_once(INCLUDE_DIR.'class.misc.php'); require_once INCLUDE_DIR.'mysqli.php'; require_once INCLUDE_DIR.'class.i18n.php'; Internationalization::bootstrap(); // Set browser-preferred language (if installed) require_once INCLUDE_DIR.'class.translation.php'; // Support flags in the setup portal too if (isset($_GET['lang']) && $_GET['lang']) { $_SESSION['client:lang'] = $_GET['lang']; } TextDomain::configureForUser(); ?>
function start() { // Prep basic translation support Internationalization::bootstrap(); if (!($ost = new osTicket())) { return null; } //Set default time zone... user/staff settting will override it (on login). $_SESSION['TZ_OFFSET'] = $ost->getConfig()->getTZoffset(); $_SESSION['TZ_DST'] = $ost->getConfig()->observeDaylightSaving(); // Bootstrap installed plugins $ost->plugins->bootstrap(); // Mirror content updates to the search backend $ost->searcher = new SearchInterface(); return $ost; }