Exemplo n.º 1
0
    // set the default handler
    $gBitSmarty->loadFilter('pre', 'tr');
    // $gBitSmarty->loadFilter('output','trimwhitespace');
    if (isset($_REQUEST['highlight'])) {
        $gBitSmarty->loadFilter('output', 'highlight');
    }
}
BitSystem::loadSingleton();
// first thing we do, is check to see if our version of bitweaver is up to date.
// we need to know about this before any other package is loaded to ensure that we can exclude stuff that isn't backwards compatible.
// BIT_INSTALL is set by the installer and LOGIN_VALIDATE is set in users/validate.php
if (!empty($gBitSystem->mConfig) && version_compare(MIN_BIT_VERSION, $gBitSystem->getVersion(), '>') && !(defined('BIT_INSTALL') || defined('LOGIN_VALIDATE'))) {
    define('INSTALLER_FORCE', TRUE);
}
BitSystem::prependIncludePath(UTIL_PKG_PATH . '/');
BitSystem::prependIncludePath(EXTERNAL_LIBS_PATH . 'pear/');
require_once LANGUAGES_PKG_PATH . 'BitLanguage.php';
BitLanguage::loadSingleton();
// collects information about the browser - needed for various browser specific theme settings
require_once UTIL_PKG_PATH . 'phpsniff/phpSniff.class.php';
global $gSniffer;
$gSniffer = new phpSniff();
if (file_exists(ini_get('browscap'))) {
    $browserInfo = array_merge($gSniffer->_browser_info, get_browser(null, true));
    $gBitSmarty->assignByRef('gBrowserInfo', $browserInfo);
} else {
    $gBitSmarty->assignByRef('gBrowserInfo', $gSniffer->_browser_info);
}
// set various classes global
global $gBitUser, $gTicket, $userlib, $gBitDbType, $gLibertySystem;
if ($gBitSystem->isDatabaseValid()) {