Пример #1
0
}
//
//-- We will load the classes in 2 stages..SQL, Cache, Login and User classes first
//
//if its still unset, default back to mysql
if (!isset($classes['objSQL'])) {
    $classes['objSQL'] = array($classDir . 'driver.mysql.php', $config['db']);
}
$classes['objCache'] = array($classDir . 'class.cache.php', array('useCache' => $cacheWritable, 'cacheDir' => $cachePath));
$classes['objLogin'] = array($classDir . 'class.login.php');
$classes['objUser'] = array($classDir . 'class.user.php');
//plugins have been moved here so we can hook into the init of stage 2 classes
//and possibly load some custom ones such as reCaptcha etc ;)
$classes['objPlugins'] = array($classDir . 'class.plugins.php');
//init the sql and cache classes, we need these before we can go any further
$doneSetup = $objCore->setup($classes);
if (!$doneSetup) {
    msgDie('FAIL', sprintf($errorTPL, 'Fatal Error', 'Cannot load CMS Classes, make sure file structure is intact and $cmsROOT is defined properly if applicable.'));
}
unset($classes, $doneSetup);
//connect to mysql
$connectTest = $objCore->objSQL->connect(true, LOCALHOST && cmsDEBUG ? true : false, is_file(cmsROOT . 'cache/ALLOW_LOGGING'));
if (!$connectTest) {
    msgDie('FAIL', sprintf($errorTPL, 'Fatal Error', 'Connecting to SQL failed. ' . $objCore->objSQL->getVar('errorMsg') . (cmsDEBUG ? '<br />' . $objCore->objSQL->getError() : NULL)));
}
unset($config['db']['password'], $connectTest);
//
//--Cache Vars init
//
//if it didnt, check to see which of the files didnt get added and try to get them manually
if (!isset($config_db)) {