示例#1
0
    $db->sql_freeresult($result);
} else {
    $board_config = $cached_board_config = array();
    $sql = 'SELECT *
		FROM ' . CONFIG_TABLE;
    if (!($result = $db->sql_query($sql))) {
        message_die(CRITICAL_ERROR, 'Could not query config	information', '', __LINE__, __FILE__, $sql);
    }
    while ($row = $db->sql_fetchrow($result)) {
        if (!$row['is_dynamic']) {
            $cached_board_config[$row['config_name']] = $row['config_value'];
        }
        $board_config[$row['config_name']] = $row['config_value'];
    }
    $db->sql_freeresult($result);
    $cache->put('board_config', $cached_board_config);
    unset($cached_board_config);
}
// Tidy	the	cache
if (method_exists($cache, 'tidy') && time() - $board_config['cache_gc'] > $board_config['cache_last_gc']) {
    $cache->tidy();
    set_config('cache_last_gc', time(), TRUE);
}
// Only through a error when we are outside of a sandbox.
if ((file_exists('install') || file_exists('contrib')) && !file_exists('CVS')) {
    message_die(GENERAL_MESSAGE, 'Please ensure both the install/ and contrib/ directories are deleted');
}
if ($board_config['auth_mode'] == 'ldap') {
    include $phpbb_root_path . 'includes/functions_ldap_groups.' . $phpEx;
    include $phpbb_root_path . 'includes/functions_ldap.' . $phpEx;
}