Example #1
0
$qi_config['version_check'] = false;
$qi_config['qi_version'] = QI_VERSION;
$qi_config['phpbb_version'] = PHPBB_VERSION;
$qi_config['automod_version'] = AUTOMOD_VERSION;
// If we get here and the extension isn't loaded it should be safe to just go ahead and load it
$available_dbms = get_available_dbms($dbms);
if (!isset($available_dbms[$dbms]['DRIVER'])) {
    trigger_error("The {$dbms} dbms is either not supported, or the php extension for it could not be loaded.", E_USER_ERROR);
}
// Load the appropriate database class if not already loaded
include $phpbb_root_path . 'includes/db/' . $available_dbms[$dbms]['DRIVER'] . '.' . $phpEx;
// now the quickinstall dbal extension
include $quickinstall_path . 'includes/db/' . $available_dbms[$dbms]['DRIVER'] . '.' . $phpEx;
// Instantiate the database
$sql_db = 'dbal_' . $available_dbms[$dbms]['DRIVER'] . '_qi';
$db = new $sql_db();
$db->sql_connect($dbhost, $dbuser, $dbpasswd, false, $dbport, false, false);
$db->sql_return_on_error(true);
// now create a module_handler object
$auth = new auth();
$cache = new cache();
$module = new module_handler($quickinstall_path . 'modules/', 'qi_');
// Set some standard variables we want to force
$config = array('load_tplcompile' => '1');
// overwrite
$cache->cache_dir = $quickinstall_path . 'cache/';
$template->cachepath = $quickinstall_path . 'cache/tpl_qi_';
// load lang
qi::add_lang(array('qi', 'phpbb'));
// Load the main module
$module->load($mode, 'qi_main');
Example #2
0
        $update_msg .= '</ul>';
        gen_error_msg($update_msg, $update_title, $update_explain, true);
    }
}
// Probably best place to validate the settings
$settings->validate();
$error = $settings->get_error();
$page = empty($error) ? $page : 'settings';
if ($page == 'main' || $page == 'settings' || $alt_env_missing) {
    if ($settings->install || $settings->is_converted || $mode == 'update_settings' || $page == 'settings' || $alt_env_missing) {
        $page = 'settings';
        require $quickinstall_path . 'includes/qi_settings.' . $phpEx;
    }
}
// Hide manage boards if there is no saved config.
$template->assign_var('S_IN_INSTALL', $settings->install);
// now create a module_handler object
$module = new module_handler($quickinstall_path . 'modules/', 'qi_');
// Set some standard variables we want to force
if (defined('PHPBB_31')) {
    $config = new \phpbb\config\config(array('load_tplcompile' => '1'));
    set_config(false, false, false, $config);
    set_config_count(null, null, null, $config);
} else {
    $config = array('load_tplcompile' => '1');
}
// overwrite
$cache->cache_dir = $settings->get_cache_dir();
$template->cachepath = $cache->cache_dir . 'tpl_qi_';
// Load the main module
$module->load($page, 'qi_main');