Vergleich install/index.php - 1.8.25 - 1.8.36

  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();

Zeile 61Zeile 60

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


// 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 121Zeile 121
			'short_title' => 'SQLite',
'structure_file' => 'sqlite_db_tables.php',
'population_file' => 'pgsql_db_inserts.php'

			'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'

		);
}
}

		);
}
}

Zeile 708Zeile 728
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.





  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the

Zeile 1118Zeile 1138
	else
{
$configstatus = $lang->sprintf($lang->req_step_span_pass, $lang->writable);

	else
{
$configstatus = $lang->sprintf($lang->req_step_span_pass, $lang->writable);

 
		@fclose($configwritable);

	}

	}

	@fclose($configwritable);

 

// Check settings file is writable
$settingswritable = @fopen(MYBB_ROOT.'inc/settings.php', 'w');


// Check settings file is writable
$settingswritable = @fopen(MYBB_ROOT.'inc/settings.php', 'w');

Zeile 1132Zeile 1152
	else
{
$settingsstatus = $lang->sprintf($lang->req_step_span_pass, $lang->writable);

	else
{
$settingsstatus = $lang->sprintf($lang->req_step_span_pass, $lang->writable);

 
		@fclose($settingswritable);

	}

	}

	@fclose($settingswritable);

 

// Check cache directory is writable
$cachewritable = @fopen(MYBB_ROOT.'cache/test.write', 'w');


// Check cache directory is writable
$cachewritable = @fopen(MYBB_ROOT.'cache/test.write', 'w');

Zeile 1142Zeile 1162
		$errors[] = $lang->sprintf($lang->req_step_error_box, $lang->req_step_error_cachedir);
$cachestatus = $lang->sprintf($lang->req_step_span_fail, $lang->not_writable);
$showerror = 1;

		$errors[] = $lang->sprintf($lang->req_step_error_box, $lang->req_step_error_cachedir);
$cachestatus = $lang->sprintf($lang->req_step_span_fail, $lang->not_writable);
$showerror = 1;

		@fclose($cachewritable);
}
else

	}
else


	{
$cachestatus = $lang->sprintf($lang->req_step_span_pass, $lang->writable);
@fclose($cachewritable);

	{
$cachestatus = $lang->sprintf($lang->req_step_span_pass, $lang->writable);
@fclose($cachewritable);

Zeile 1159Zeile 1178
	{
$errors[] = $lang->sprintf($lang->req_step_error_box, $lang->req_step_error_uploaddir);
$uploadsstatus = $lang->sprintf($lang->req_step_span_fail, $lang->not_writable);

	{
$errors[] = $lang->sprintf($lang->req_step_error_box, $lang->req_step_error_uploaddir);
$uploadsstatus = $lang->sprintf($lang->req_step_span_fail, $lang->not_writable);

		$showerror = 1;
@fclose($uploadswritable);
}
else

		$showerror = 1;
}
else


	{
$uploadsstatus = $lang->sprintf($lang->req_step_span_pass, $lang->writable);
@fclose($uploadswritable);

	{
$uploadsstatus = $lang->sprintf($lang->req_step_span_pass, $lang->writable);
@fclose($uploadswritable);

Zeile 1178Zeile 1196
		$errors[] =  $lang->sprintf($lang->req_step_error_box, $lang->req_step_error_avatardir);
$avatarsstatus = $lang->sprintf($lang->req_step_span_fail, $lang->not_writable);
$showerror = 1;

		$errors[] =  $lang->sprintf($lang->req_step_error_box, $lang->req_step_error_avatardir);
$avatarsstatus = $lang->sprintf($lang->req_step_span_fail, $lang->not_writable);
$showerror = 1;

		@fclose($avatarswritable);

 
	}
else
{

	}
else
{

Zeile 1199Zeile 1216
		echo "\n			<input type=\"hidden\" name=\"action\" value=\"{$mybb->input['action']}\" />";
echo "\n <div id=\"next_button\"><input type=\"submit\" class=\"submit_button\" value=\"{$lang->recheck} &raquo;\" /></div><br style=\"clear: both;\" />\n";
$output->print_footer();

		echo "\n			<input type=\"hidden\" name=\"action\" value=\"{$mybb->input['action']}\" />";
echo "\n <div id=\"next_button\"><input type=\"submit\" class=\"submit_button\" value=\"{$lang->recheck} &raquo;\" /></div><br style=\"clear: both;\" />\n";
$output->print_footer();

	}
else
{

	}
else
{

		echo $lang->req_step_reqcomplete;
$output->print_footer('database_info');
}

		echo $lang->req_step_reqcomplete;
$output->print_footer('database_info');
}

Zeile 1258Zeile 1275
	foreach($dboptions as $dbfile => $dbtype)
{
if($mybb->get_input('dbengine') == $dbfile)

	foreach($dboptions as $dbfile => $dbtype)
{
if($mybb->get_input('dbengine') == $dbfile)

		{

		{

			$dbengines .= "<option value=\"{$dbfile}\" selected=\"selected\">{$dbtype['title']}</option>";
}
else

			$dbengines .= "<option value=\"{$dbfile}\" selected=\"selected\">{$dbtype['title']}</option>";
}
else

Zeile 1296Zeile 1313
			$mybb->input['config'][$dbfile]['dbpass'] = '';
}
if(empty($mybb->input['config'][$dbfile]['encoding']))

			$mybb->input['config'][$dbfile]['dbpass'] = '';
}
if(empty($mybb->input['config'][$dbfile]['encoding']))

		{

		{

			$mybb->input['config'][$dbfile]['encoding'] = "utf8";

			$mybb->input['config'][$dbfile]['encoding'] = "utf8";

		}


		}


		$class = '';
if(empty($first) && !$mybb->get_input('dbengine'))
{
$mybb->input['dbengine'] = $dbfile;
$first = true;

		$class = '';
if(empty($first) && !$mybb->get_input('dbengine'))
{
$mybb->input['dbengine'] = $dbfile;
$first = true;

		}

		}

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

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

Zeile 1313Zeile 1330

$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>";

// SQLite gets some special settings
if($dbfile == 'sqlite')

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

// SQLite gets some special settings
if($dbfile == 'sqlite')

		{
$db_info[$dbfile] .= "

		{
$db_info[$dbfile] .= "

				<tr class=\"alt_row\">
<td class=\"first\"><label for=\"config_{$dbfile}_dbname\">{$lang->database_path}</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 class=\"alt_row\">
<td class=\"first\"><label for=\"config_{$dbfile}_dbname\">{$lang->database_path}</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>

Zeile 1328Zeile 1345
		}
// Others get db host, username, password etc
else

		}
// Others get db host, username, password etc
else

		{
$db_info[$dbfile] .= "
<tr class=\"alt_row\">

		{
$db_info[$dbfile] .= "
<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>

					<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>

				</tr>

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

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

				</tr>

				</tr>

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

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

Zeile 1346Zeile 1363
					<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] .= "
<tr>

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

Zeile 1380Zeile 1397
					<td class=\"last alt_col\"><select name=\"config[{$dbfile}][encoding]\" id=\"config_{$dbfile}_encoding\">{$select_options}</select></td>
</tr>
</tbody>";

					<td class=\"last alt_col\"><select name=\"config[{$dbfile}][encoding]\" id=\"config_{$dbfile}_encoding\">{$select_options}</select></td>
</tr>
</tbody>";

		}

		}

	}
$dbconfig = implode("", $db_info);

	}
$dbconfig = implode("", $db_info);





	echo $lang->sprintf($lang->db_step_config_table, $dbengines, $dbconfig);
$output->print_footer('create_tables');
}

	echo $lang->sprintf($lang->db_step_config_table, $dbengines, $dbconfig);
$output->print_footer('create_tables');
}





/**
* Create our tables
*/

/**
* Create our tables
*/

Zeile 1397Zeile 1414

$mybb->input['dbengine'] = $mybb->get_input('dbengine');
if(!file_exists(MYBB_ROOT."inc/db_{$mybb->input['dbengine']}.php"))


$mybb->input['dbengine'] = $mybb->get_input('dbengine');
if(!file_exists(MYBB_ROOT."inc/db_{$mybb->input['dbengine']}.php"))

	{

	{

		$errors[] = $lang->db_step_error_invalidengine;
database_info();
}

		$errors[] = $lang->db_step_error_invalidengine;
database_info();
}

Zeile 1423Zeile 1440
			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'],


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

Zeile 1464Zeile 1492
		$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 1660Zeile 1688
		$val = preg_replace('#mybb_(\S+?)([\s\.,\(]|$)#', $config['tableprefix'].'\\1\\2', $val);
$val = preg_replace('#;$#', $db->build_create_table_collation().";", $val);
preg_match('#CREATE TABLE (\S+)(\s?|\(?)\(#i', $val, $match);

		$val = preg_replace('#mybb_(\S+?)([\s\.,\(]|$)#', $config['tableprefix'].'\\1\\2', $val);
$val = preg_replace('#;$#', $db->build_create_table_collation().";", $val);
preg_match('#CREATE TABLE (\S+)(\s?|\(?)\(#i', $val, $match);

		if($match[1])

		if(!empty($match[1]))

		{
$db->drop_table($match[1], false, false);
echo $lang->sprintf($lang->tablecreate_step_created, $match[1]);
}
$db->query($val);

		{
$db->drop_table($match[1], false, false);
echo $lang->sprintf($lang->tablecreate_step_created, $match[1]);
}
$db->query($val);

		if($match[1])

		if(!empty($match[1]))

		{
echo $lang->done . "<br />\n";
}

		{
echo $lang->done . "<br />\n";
}

Zeile 1780Zeile 1808
	// 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 1958Zeile 1985
		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 2027Zeile 2058
		$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 2098Zeile 2129

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 2136Zeile 2167
		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 2240Zeile 2271

// 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 2336Zeile 2367

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 2419Zeile 2450
	$cache->update_threadprefixes();
$cache->update_forumsdisplay();
$cache->update("plugins", array());

	$cache->update_threadprefixes();
$cache->update_forumsdisplay();
$cache->update("plugins", array());

 
	$cache->update("mostonline", array(
'numusers' => 0,
'time' => 0,
));

	$cache->update("internal_settings", array('encryption_key' => random_str(32)));
$cache->update_default_theme();
$cache->update_reportreasons(true);

	$cache->update("internal_settings", array('encryption_key' => random_str(32)));
$cache->update_default_theme();
$cache->update_reportreasons(true);

Zeile 2450Zeile 2485
	if(is_writable('./'))
{
$lock = @fopen('./lock', 'w');

	if(is_writable('./'))
{
$lock = @fopen('./lock', 'w');

		$written = @fwrite($lock, '1');
@fclose($lock);
if($written)


if($lock !== false)


		{

		{

			echo $lang->done_step_locked;







			$written = @fwrite($lock, '1');
@fclose($lock);

if($written)
{
echo $lang->done_step_locked;
}

		}
}
if(!$written)

		}
}
if(!$written)

Zeile 2468Zeile 2508
/**
* @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 2480Zeile 2520
			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;