Ejemplo n.º 1
0
$vbulletin = new vB_Registry();
// parse the configuration ini file
$vbulletin->fetch_config();
if (CWD == '.') {
    // getcwd() failed and so we need to be told the full forum path in config.php
    if (!empty($vbulletin->config['Misc']['forumpath'])) {
        define('DIR', $vbulletin->config['Misc']['forumpath']);
    } else {
        // This can not be phrased as it appears before phrase load and phrases won't load if we move this after ..
        trigger_error('<strong>Configuration</strong>: You must insert a value for <strong>forumpath</strong> in config.php', E_USER_ERROR);
    }
} else {
    define('DIR', CWD);
}
// Load Phrases
$phrases = vB_Upgrade::fetch_language();
if (!defined('VB_AREA') and !defined('THIS_SCRIPT')) {
    echo $phrases['core']['VB_AREA_not_defined'];
    exit;
}
if (isset($_REQUEST['GLOBALS']) or isset($_FILES['GLOBALS'])) {
    echo $phrases['core']['request_tainting_attempted'];
    exit;
}
if (!empty($vbulletin->config['Misc']['datastorepath'])) {
    define('DATASTORE', $vbulletin->config['Misc']['datastorepath']);
} else {
    define('DATASTORE', DIR . '/includes/datastore');
}
$dbtype = strtolower($vbulletin->config['Database']['dbtype']);
// MySQL is Deprecated in PHP 5.5+, Force MySQLi
Ejemplo n.º 2
0
ignore_user_abort(true);
chdir('./../');
// ##################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_IMPORT_DOTS', true);
define('NOZIP', 1);
if (!defined('VB_AREA')) {
    define('VB_AREA', 'Upgrade');
}
define('TIMENOW', time());
if (!defined('VB_ENTRY')) {
    define('VB_ENTRY', 'upgrade.php');
}
require_once './install/includes/language.php';
if (!function_exists('version_compare') or version_compare(PHP_VERSION, '5.0.0', '<')) {
    echo PHP4_ERROR;
    exit;
}
// ########################## REQUIRE BACK-END ############################
require_once './install/includes/class_upgrade.php';
require_once './install/init.php';
require_once DIR . '/includes/functions_misc.php';
if (function_exists('set_time_limit') and !SAFEMODE) {
    @set_time_limit(0);
}
$verify =& vB_Upgrade::fetch_library($vbulletin, $phrases, '', !defined('VBINSTALL'));
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 03:13, Sat Sep 7th 2013
|| # CVS: $RCSfile$ - $Revision: 39181 $
|| ####################################################################
\*======================================================================*/