Esempio n. 1
0
    header('location:' . $sErrorPage);
    exit(0);
}
$KTInit->setupServerVariables();
// instantiate log
$loggingSupport = $KTInit->setupLogging();
// Send all PHP errors to a file (and maybe a window)
set_error_handler(array('KTInit', 'handlePHPError'));
$KTInit->setupRandomSeed();
$GLOBALS['KTRootUrl'] = $oKTConfig->get('KnowledgeTree/rootUrl');
require_once KT_LIB_DIR . '/database/lookup.inc';
// table mapping entries
include 'tableMappings.inc';
$default->systemVersion = trim(file_get_contents(KT_DIR . '/docs/VERSION.txt'));
$default->versionName = trim(file_get_contents(KT_DIR . '/docs/VERSION-NAME.txt'));
$KTInit->cleanGlobals();
$KTInit->cleanMagicQuotes();
// site map definition
require_once KT_DIR . '/config/siteMap.inc';
require_once KT_LIB_DIR . '/session/Session.inc';
require_once KT_LIB_DIR . '/session/control.inc';
require_once KT_LIB_DIR . '/plugins/pluginutil.inc.php';
if ($checkup !== true) {
    // Replace function later
    /* ** Get the page being loaded and load the plugins specific to the page ** */
    $sScriptName = $GLOBALS['_SERVER']['SCRIPT_NAME'];
    $sScript = basename($sScriptName);
    $pos = strpos($sScript, '.');
    $sType = substr($sScript, 0, $pos);
    KTPluginUtil::loadPlugins($sType);
}