Exemplo n.º 1
0
if (defined('QUERY_CACHE_ACTIVE')) {
    $gBitDb->setCaching();
}
require_once KERNEL_PKG_PATH . 'BitSystem.php';
global $gBitSmarty, $gBitSystem;
// make sure we only create one BitSmarty
if (!is_object($gBitSmarty)) {
    $gBitSmarty = new BitSmarty();
    // 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'))) {