Vergleich install/index.php - 1.8.14 - 1.8.27

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 52Zeile 52
	}
}


	}
}


require_once MYBB_ROOT.'inc/class_xml.php';

 
require_once MYBB_ROOT.'inc/functions_user.php';
require_once MYBB_ROOT.'inc/class_language.php';
$lang = new MyLanguage();

require_once MYBB_ROOT.'inc/functions_user.php';
require_once MYBB_ROOT.'inc/class_language.php';
$lang = new MyLanguage();

$lang->set_path(MYBB_ROOT.'install/resources');

$lang->set_path(INSTALL_ROOT.'resources');

$lang->load('language');

// Load DB interface
require_once MYBB_ROOT."inc/db_base.php";

$lang->load('language');

// Load DB interface
require_once MYBB_ROOT."inc/db_base.php";

 
require_once MYBB_ROOT."inc/AbstractPdoDbDriver.php";


// Prevent any shut down functions from running
$done_shutdown = 1;


// Prevent any shut down functions from running
$done_shutdown = 1;

Zeile 106Zeile 106
		'title' => 'PostgreSQL',
'short_title' => 'PostgreSQL',
'structure_file' => 'pgsql_db_tables.php',

		'title' => 'PostgreSQL',
'short_title' => 'PostgreSQL',
'structure_file' => 'pgsql_db_tables.php',

		'population_file' => 'mysql_db_inserts.php'

		'population_file' => 'pgsql_db_inserts.php'

	);
}

	);
}





if(class_exists('PDO'))
{
$supported_dbs = PDO::getAvailableDrivers();

if(class_exists('PDO'))
{
$supported_dbs = PDO::getAvailableDrivers();

Zeile 120Zeile 120
			'title' => 'SQLite 3',
'short_title' => 'SQLite',
'structure_file' => 'sqlite_db_tables.php',

			'title' => 'SQLite 3',
'short_title' => 'SQLite',
'structure_file' => 'sqlite_db_tables.php',

 
			'population_file' => 'pgsql_db_inserts.php'
);
}

if (in_array('pgsql', $supported_dbs)) {
$dboptions['pgsql_pdo'] = array(
'class' => 'PostgresPdoDbDriver',
'title' => 'PostgreSQL (PDO)',
'short_title' => 'PostgreSQL (PDO)',
'structure_file' => 'pgsql_db_tables.php',
'population_file' => 'pgsql_db_inserts.php'
);
}

if (in_array('mysql', $supported_dbs)) {
$dboptions['mysql_pdo'] = array(
'class' => 'MysqlPdoDbDriver',
'title' => 'MySQL (PDO)',
'short_title' => 'MySQL (PDO)',
'structure_file' => 'mysql_db_tables.php',

			'population_file' => 'mysql_db_inserts.php'
);
}

			'population_file' => 'mysql_db_inserts.php'
);
}

Zeile 1280Zeile 1300
			$mybb->input['config'][$dbfile]['dbhost'] = "localhost";
}
if(empty($mybb->input['config'][$dbfile]['tableprefix']))

			$mybb->input['config'][$dbfile]['dbhost'] = "localhost";
}
if(empty($mybb->input['config'][$dbfile]['tableprefix']))

		{

		{

			$mybb->input['config'][$dbfile]['tableprefix'] = "mybb_";
}
if(empty($mybb->input['config'][$dbfile]['dbname']))

			$mybb->input['config'][$dbfile]['tableprefix'] = "mybb_";
}
if(empty($mybb->input['config'][$dbfile]['dbname']))

Zeile 1305Zeile 1325
		{
$mybb->input['dbengine'] = $dbfile;
$first = true;

		{
$mybb->input['dbengine'] = $dbfile;
$first = true;

		}

		}

		if($dbfile == $mybb->input['dbengine'])
{
$class = "_selected";

		if($dbfile == $mybb->input['dbengine'])
{
$class = "_selected";

Zeile 1313Zeile 1333

$db_info[$dbfile] = "
<tbody id=\"{$dbfile}_settings\" class=\"db_settings db_type{$class}\">


$db_info[$dbfile] = "
<tbody id=\"{$dbfile}_settings\" class=\"db_settings db_type{$class}\">

				<tr>

				<tr>

					<th colspan=\"2\" class=\"first last\">{$dbtype['title']} {$lang->database_settings}</th>
</tr>";


					<th colspan=\"2\" class=\"first last\">{$dbtype['title']} {$lang->database_settings}</th>
</tr>";


Zeile 1330Zeile 1350
		else
{
$db_info[$dbfile] .= "

		else
{
$db_info[$dbfile] .= "

				<tr class=\"alt_row\">

				<tr class=\"alt_row\">

					<td class=\"first\"><label for=\"config_{$dbfile}_dbhost\">{$lang->database_host}</label></td>
<td class=\"last alt_col\"><input type=\"text\" class=\"text_input\" name=\"config[{$dbfile}][dbhost]\" id=\"config_{$dbfile}_dbhost\" value=\"".htmlspecialchars_uni($mybb->input['config'][$dbfile]['dbhost'])."\" /></td>
</tr>

					<td class=\"first\"><label for=\"config_{$dbfile}_dbhost\">{$lang->database_host}</label></td>
<td class=\"last alt_col\"><input type=\"text\" class=\"text_input\" name=\"config[{$dbfile}][dbhost]\" id=\"config_{$dbfile}_dbhost\" value=\"".htmlspecialchars_uni($mybb->input['config'][$dbfile]['dbhost'])."\" /></td>
</tr>

Zeile 1346Zeile 1366
					<td class=\"first\"><label for=\"config_{$dbfile}_dbname\">{$lang->database_name}</label></td>
<td class=\"last alt_col\"><input type=\"text\" class=\"text_input\" name=\"config[{$dbfile}][dbname]\" id=\"config_{$dbfile}_dbname\" value=\"".htmlspecialchars_uni($mybb->input['config'][$dbfile]['dbname'])."\" /></td>
</tr>";

					<td class=\"first\"><label for=\"config_{$dbfile}_dbname\">{$lang->database_name}</label></td>
<td class=\"last alt_col\"><input type=\"text\" class=\"text_input\" name=\"config[{$dbfile}][dbname]\" id=\"config_{$dbfile}_dbname\" value=\"".htmlspecialchars_uni($mybb->input['config'][$dbfile]['dbname'])."\" /></td>
</tr>";

		}

		}


// Now we're up to table settings
$db_info[$dbfile] .= "


// Now we're up to table settings
$db_info[$dbfile] .= "

Zeile 1423Zeile 1443
			break;
case "pgsql":
$db = new DB_PgSQL;

			break;
case "pgsql":
$db = new DB_PgSQL;

 
			break;
case "pgsql_pdo":
$db = new PostgresPdoDbDriver();

			break;
case "mysqli":
$db = new DB_MySQLi;

			break;
case "mysqli":
$db = new DB_MySQLi;

 
			break;
case "mysql_pdo":
$db = new MysqlPdoDbDriver();

			break;
default:
$db = new DB_MySQL;

			break;
default:
$db = new DB_MySQL;

	}

	}

 	$db->error_reporting = 0;

 	$db->error_reporting = 0;









if(!isset($config['encoding']))
{
$config['encoding'] = null;
}


	$connect_array = array(
"hostname" => $config['dbhost'],
"username" => $config['dbuser'],

	$connect_array = array(
"hostname" => $config['dbhost'],
"username" => $config['dbuser'],

Zeile 1444Zeile 1475
	if($connection === false)
{
$errors[] = $lang->sprintf($lang->db_step_error_noconnect, htmlspecialchars_uni($config['dbhost']));

	if($connection === false)
{
$errors[] = $lang->sprintf($lang->db_step_error_noconnect, htmlspecialchars_uni($config['dbhost']));

	}

	}

	// double check if the DB exists for MySQL
elseif(method_exists($db, 'select_db') && !$db->select_db($config['dbname']))
{

	// double check if the DB exists for MySQL
elseif(method_exists($db, 'select_db') && !$db->select_db($config['dbname']))
{

Zeile 1464Zeile 1495
		$errors[] = $lang->db_step_error_tableprefix_too_long;
}


		$errors[] = $lang->db_step_error_tableprefix_too_long;
}


	if(($db->engine == 'mysql' || $db->engine == 'mysqli') && $config['encoding'] == 'utf8mb4' && version_compare($db->get_version(), '5.5.3', '<'))

	if($connection !== false && ($db->engine == 'mysql' || $db->engine == 'mysqli') && $config['encoding'] == 'utf8mb4' && version_compare($db->get_version(), '5.5.3', '<'))

	{
$errors[] = $lang->db_step_error_utf8mb4_error;
}

	{
$errors[] = $lang->db_step_error_utf8mb4_error;
}

Zeile 1508Zeile 1539
 *  rename your Admin CP directory. You then need
* to adjust the value below to point to the
* new directory.

 *  rename your Admin CP directory. You then need
* to adjust the value below to point to the
* new directory.

 */

\$config['admin_dir'] = 'admin';

 */

\$config['admin_dir'] = 'admin';


/**
* Hide all Admin CP links


/**
* Hide all Admin CP links

Zeile 1518Zeile 1549
 *  on the front end of the board after
* renaming your Admin CP directory, set this
* to 1.

 *  on the front end of the board after
* renaming your Admin CP directory, set this
* to 1.

 */

\$config['hide_admin_links'] = 0;

/**

 */

\$config['hide_admin_links'] = 0;

/**

 * Data-cache configuration
* The data cache is a temporary cache
* of the most commonly accessed data in MyBB.
* By default, the database is used to store this data.

 * Data-cache configuration
* The data cache is a temporary cache
* of the most commonly accessed data in MyBB.
* By default, the database is used to store this data.

 *
* If you wish to use the file system (cache/ directory), MemCache (or MemCached), xcache, APC, or eAccelerator
* you can change the value below to 'files', 'memcache', 'memcached', 'xcache', 'apc' or 'eaccelerator' from 'db'.
*/

\$config['cache_store'] = 'db';

 *
* If you wish to use the file system (cache/ directory), MemCache (or MemCached), xcache, APC, APCu, eAccelerator or Redis
* you can change the value below to 'files', 'memcache', 'memcached', 'xcache', 'apc', 'apcu', 'eaccelerator' or 'redis' from 'db'.
*/

\$config['cache_store'] = 'db';


/**
* Memcache configuration


/**
* Memcache configuration

Zeile 1545Zeile 1576

\$config['memcache']['host'] = 'localhost';
\$config['memcache']['port'] = 11211;


\$config['memcache']['host'] = 'localhost';
\$config['memcache']['port'] = 11211;

 

/**
* Redis configuration
* If you are using Redis as your data-cache
* you need to configure the hostname and port
* of your redis server below. If you want
* to connect via unix sockets, use the full
* path to the unix socket as host and leave
* the port setting unconfigured or false.
*/

\$config['redis']['host'] = 'localhost';
\$config['redis']['port'] = 6379;


/**
* Super Administrators


/**
* Super Administrators

Zeile 1667Zeile 1711
 */
function populate_tables()
{

 */
function populate_tables()
{

	global $output, $lang;

	global $output, $lang, $dboptions;


require MYBB_ROOT.'inc/config.php';
$db = db_connection($config);


require MYBB_ROOT.'inc/config.php';
$db = db_connection($config);

Zeile 1767Zeile 1811
	// 1.8: Stylesheet Colors
$contents = @file_get_contents(INSTALL_ROOT.'resources/mybb_theme_colors.xml');


	// 1.8: Stylesheet Colors
$contents = @file_get_contents(INSTALL_ROOT.'resources/mybb_theme_colors.xml');


	require_once MYBB_ROOT."inc/class_xml.php";
$parser = new XMLParser($contents);

	$parser = create_xml_parser($contents);


	$tree = $parser->get_tree();

if(is_array($tree) && is_array($tree['colors']))

	$tree = $parser->get_tree();

if(is_array($tree) && is_array($tree['colors']))

Zeile 1945Zeile 1988
		if(isset($_SERVER['SERVER_ADMIN']) && filter_var($_SERVER['SERVER_ADMIN'], FILTER_VALIDATE_EMAIL))
{
$contactemail = $_SERVER['SERVER_ADMIN'];

		if(isset($_SERVER['SERVER_ADMIN']) && filter_var($_SERVER['SERVER_ADMIN'], FILTER_VALIDATE_EMAIL))
{
$contactemail = $_SERVER['SERVER_ADMIN'];

 
		}
else
{
$contactemail = null;

		}
}


		}
}


Zeile 2014Zeile 2061
		$adminuser = $adminemail = '';

$settings = file_get_contents(INSTALL_ROOT.'resources/settings.xml');

		$adminuser = $adminemail = '';

$settings = file_get_contents(INSTALL_ROOT.'resources/settings.xml');

		$parser = new XMLParser($settings);

		$parser = create_xml_parser($settings);

		$parser->collapse_dups = 0;
$tree = $parser->get_tree();
$groupcount = $settingcount = 0;

		$parser->collapse_dups = 0;
$tree = $parser->get_tree();
$groupcount = $settingcount = 0;

Zeile 2085Zeile 2132

include_once MYBB_ROOT."inc/functions_task.php";
$tasks = file_get_contents(INSTALL_ROOT.'resources/tasks.xml');


include_once MYBB_ROOT."inc/functions_task.php";
$tasks = file_get_contents(INSTALL_ROOT.'resources/tasks.xml');

		$parser = new XMLParser($tasks);

		$parser = create_xml_parser($tasks);

		$parser->collapse_dups = 0;
$tree = $parser->get_tree();
$taskcount = 0;

		$parser->collapse_dups = 0;
$tree = $parser->get_tree();
$taskcount = 0;

Zeile 2123Zeile 2170
		echo $lang->sprintf($lang->admin_step_insertedtasks, $taskcount);

$views = file_get_contents(INSTALL_ROOT.'resources/adminviews.xml');

		echo $lang->sprintf($lang->admin_step_insertedtasks, $taskcount);

$views = file_get_contents(INSTALL_ROOT.'resources/adminviews.xml');

		$parser = new XMLParser($views);

		$parser = create_xml_parser($views);

		$parser->collapse_dups = 0;
$tree = $parser->get_tree();
$view_count = 0;

		$parser->collapse_dups = 0;
$tree = $parser->get_tree();
$view_count = 0;

Zeile 2227Zeile 2274

// Insert all of our user groups from the XML file
$usergroup_settings = file_get_contents(INSTALL_ROOT.'resources/usergroups.xml');


// Insert all of our user groups from the XML file
$usergroup_settings = file_get_contents(INSTALL_ROOT.'resources/usergroups.xml');

	$parser = new XMLParser($usergroup_settings);

	$parser = create_xml_parser($usergroup_settings);

	$parser->collapse_dups = 0;
$tree = $parser->get_tree();


	$parser->collapse_dups = 0;
$tree = $parser->get_tree();


Zeile 2282Zeile 2329
		'lastvisit' => $now,
'website' => '',
'icq' => '',

		'lastvisit' => $now,
'website' => '',
'icq' => '',

		'aim' => '',
'yahoo' => '',

 
		'skype' =>'',
'google' =>'',
'birthday' => '',

		'skype' =>'',
'google' =>'',
'birthday' => '',

Zeile 2315Zeile 2360
		'referrer' => 0,
'buddylist' => '',
'ignorelist' => '',

		'referrer' => 0,
'buddylist' => '',
'ignorelist' => '',

		'pmfolders' => '',

		'pmfolders' => "0**$%%$1**$%%$2**$%%$3**$%%$4**",

		'notepad' => '',
'showredirect' => 1,
'usernotes' => ''

		'notepad' => '',
'showredirect' => 1,
'usernotes' => ''

Zeile 2325Zeile 2370

echo $lang->done_step_adminoptions;
$adminoptions = file_get_contents(INSTALL_ROOT.'resources/adminoptions.xml');


echo $lang->done_step_adminoptions;
$adminoptions = file_get_contents(INSTALL_ROOT.'resources/adminoptions.xml');

	$parser = new XMLParser($adminoptions);

	$parser = create_xml_parser($adminoptions);

	$parser->collapse_dups = 0;
$tree = $parser->get_tree();
$insertmodule = array();

	$parser->collapse_dups = 0;
$tree = $parser->get_tree();
$insertmodule = array();

Zeile 2368Zeile 2413
	// Automatic Login
my_unsetcookie("sid");
my_unsetcookie("mybbuser");

	// Automatic Login
my_unsetcookie("sid");
my_unsetcookie("mybbuser");

	my_setcookie('mybbuser', $uid.'_'.$loginkey, null, true);

	my_setcookie('mybbuser', $uid.'_'.$loginkey, null, true, "lax");

	ob_end_flush();

// Make fulltext columns if supported

	ob_end_flush();

// Make fulltext columns if supported

Zeile 2402Zeile 2447
	$cache->update_posticons();
$cache->update_spiders();
$cache->update_bannedips();

	$cache->update_posticons();
$cache->update_spiders();
$cache->update_bannedips();

	$cache->update_banned();

 
	$cache->update_bannedemails();
$cache->update_birthdays();
$cache->update_groupleaders();

	$cache->update_bannedemails();
$cache->update_birthdays();
$cache->update_groupleaders();

Zeile 2458Zeile 2502
/**
* @param array $config
*

/**
* @param array $config
*

 * @return DB_MySQL|DB_MySQLi|DB_PgSQL|DB_SQLite

 * @return DB_MySQL|DB_MySQLi|DB_PgSQL|DB_SQLite|PostgresPdoDbDriver|MysqlPdoDbDriver

 */
function db_connection($config)
{

 */
function db_connection($config)
{

Zeile 2470Zeile 2514
			break;
case "pgsql":
$db = new DB_PgSQL;

			break;
case "pgsql":
$db = new DB_PgSQL;

 
			break;
case "pgsql_pdo":
$db = new PostgresPdoDbDriver();

			break;
case "mysqli":
$db = new DB_MySQLi;

			break;
case "mysqli":
$db = new DB_MySQLi;

 
			break;
case "mysql_pdo":
$db = new MysqlPdoDbDriver();

			break;
default:
$db = new DB_MySQL;

			break;
default:
$db = new DB_MySQL;

Zeile 2515Zeile 2565
	$query = $db->simple_select('settings', '*', '', array('order_by' => 'title'));
while($setting = $db->fetch_array($query))
{

	$query = $db->simple_select('settings', '*', '', array('order_by' => 'title'));
while($setting = $db->fetch_array($query))
{

		$setting['value'] = str_replace("\"", "\\\"", $setting['value']);


		$setting['name'] = addcslashes($setting['name'], "\\'");
$setting['value'] = addcslashes($setting['value'], '\\"$');

		$settings .= "\$settings['{$setting['name']}'] = \"{$setting['value']}\";\n";
}
if(!empty($settings))

		$settings .= "\$settings['{$setting['name']}'] = \"{$setting['value']}\";\n";
}
if(!empty($settings))