Vergleich install/index.php - 1.8.28 - 1.8.38

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 1138Zeile 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 1152Zeile 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 1162Zeile 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);
@my_chmod(MYBB_ROOT.'cache', '0777');

		$cachestatus = $lang->sprintf($lang->req_step_span_pass, $lang->writable);
@fclose($cachewritable);
@my_chmod(MYBB_ROOT.'cache', '0777');

Zeile 1180Zeile 1179
		$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;

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

	}
else
{

Zeile 1198Zeile 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 1266Zeile 1263
	{
$error_list = error_list($errors);
echo $lang->sprintf($lang->db_step_error_config, $error_list);

	{
$error_list = error_list($errors);
echo $lang->sprintf($lang->db_step_error_config, $error_list);

	}

	}

	else

	else

	{

	{

		echo $lang->db_step_config_db;

		echo $lang->db_step_config_db;

	}

	}


$dbengines = '';



$dbengines = '';


Zeile 1278Zeile 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>";

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

		}

		}

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

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





	$db_info = array();
foreach($dboptions as $dbfile => $dbtype)
{

	$db_info = array();
foreach($dboptions as $dbfile => $dbtype)
{

Zeile 1298Zeile 1295
		if(empty($mybb->input['config'][$dbfile]['dbhost']))
{
$mybb->input['config'][$dbfile]['dbhost'] = "localhost";

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

		}

		}

		if(empty($mybb->input['config'][$dbfile]['tableprefix']))

		if(empty($mybb->input['config'][$dbfile]['tableprefix']))

		{

		{

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

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

		}

		}

		if(empty($mybb->input['config'][$dbfile]['dbuser']))
{
$mybb->input['config'][$dbfile]['dbuser'] = '';

		if(empty($mybb->input['config'][$dbfile]['dbuser']))
{
$mybb->input['config'][$dbfile]['dbuser'] = '';

Zeile 1314Zeile 1311
		if(empty($mybb->input['config'][$dbfile]['dbpass']))
{
$mybb->input['config'][$dbfile]['dbpass'] = '';

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

		}

		}

		if(empty($mybb->input['config'][$dbfile]['encoding']))

		if(empty($mybb->input['config'][$dbfile]['encoding']))

		{

		{

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


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


Zeile 1327Zeile 1324
			$first = true;
}
if($dbfile == $mybb->input['dbengine'])

			$first = true;
}
if($dbfile == $mybb->input['dbengine'])

		{

		{

			$class = "_selected";

			$class = "_selected";

		}


		}


		$db_info[$dbfile] = "
<tbody id=\"{$dbfile}_settings\" class=\"db_settings db_type{$class}\">
<tr>
<th colspan=\"2\" class=\"first last\">{$dbtype['title']} {$lang->database_settings}</th>

		$db_info[$dbfile] = "
<tbody id=\"{$dbfile}_settings\" class=\"db_settings db_type{$class}\">
<tr>
<th colspan=\"2\" class=\"first last\">{$dbtype['title']} {$lang->database_settings}</th>

				</tr>";

				</tr>";


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


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

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

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

		{

		{

			$db_info[$dbfile] .= "
<tr class=\"alt_row\">
<td class=\"first\"><label for=\"config_{$dbfile}_dbhost\">{$lang->database_host}</label></td>

			$db_info[$dbfile] .= "
<tr class=\"alt_row\">
<td class=\"first\"><label for=\"config_{$dbfile}_dbhost\">{$lang->database_host}</label></td>

Zeile 1473Zeile 1470

$connection = $db->connect($connect_array);
if($connection === false)


$connection = $db->connect($connect_array);
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']))

		$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']))

	{

	{

		$errors[] = $lang->sprintf($lang->db_step_error_nodbname, htmlspecialchars_uni($config['dbname']));

		$errors[] = $lang->sprintf($lang->db_step_error_nodbname, htmlspecialchars_uni($config['dbname']));

	}


	}


	// Most DB engines only allow certain characters in the table name. Oracle requires an alphabetic character first.
if((!preg_match("#^[A-Za-z][A-Za-z0-9_]*$#", $config['tableprefix'])) && $config['tableprefix'] != '')
{

	// Most DB engines only allow certain characters in the table name. Oracle requires an alphabetic character first.
if((!preg_match("#^[A-Za-z][A-Za-z0-9_]*$#", $config['tableprefix'])) && $config['tableprefix'] != '')
{

Zeile 1493Zeile 1490
	if(strlen($config['tableprefix']) > 40)
{
$errors[] = $lang->db_step_error_tableprefix_too_long;

	if(strlen($config['tableprefix']) > 40)
{
$errors[] = $lang->db_step_error_tableprefix_too_long;

	}

	}


if($connection !== false && ($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;

	}


	}


	if(is_array($errors))

	if(is_array($errors))

	{

	{

		database_info();
}

// Decide if we can use a database encoding or not
if($db->fetch_db_charsets() != false)

		database_info();
}

// Decide if we can use a database encoding or not
if($db->fetch_db_charsets() != false)

	{

	{

		$db_encoding = "\$config['database']['encoding'] = '".addcslashes($config['encoding'], "'")."';";

		$db_encoding = "\$config['database']['encoding'] = '".addcslashes($config['encoding'], "'")."';";

	}

	}

	else
{
$db_encoding = "// \$config['database']['encoding'] = '".addcslashes($config['encoding'], "'")."';";
}

	else
{
$db_encoding = "// \$config['database']['encoding'] = '".addcslashes($config['encoding'], "'")."';";
}





	// Write the configuration file
$configdata = "<?php
/**

	// Write the configuration file
$configdata = "<?php
/**

Zeile 1576Zeile 1573

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

/**
* Redis configuration
* If you are using Redis as your data-cache

Zeile 1585Zeile 1582
 *  to connect via unix sockets, use the full
* path to the unix socket as host and leave
* the port setting unconfigured or false.

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


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

Zeile 1596Zeile 1593
 *  be edited, deleted or banned in the Admin CP.
* The administrator permissions for these users
* cannot be altered either.

 *  be edited, deleted or banned in the Admin CP.
* The administrator permissions for these users
* cannot be altered either.

 */

\$config['super_admins'] = '1';

 */







/**



\$config['super_admins'] = '1';

/**

 * Database Encoding
* If you wish to set an encoding for MyBB uncomment
* the line below (if it isn't already) and change

 * Database Encoding
* If you wish to set an encoding for MyBB uncomment
* the line below (if it isn't already) and change

Zeile 1617Zeile 1614
 *  To enable this functionality for the logs below, set the
* the number of days before each log should be pruned.
* If you set the value to 0, the logs will not be pruned.

 *  To enable this functionality for the logs below, set the
* the number of days before each log should be pruned.
* If you set the value to 0, the logs will not be pruned.

 */


 */


\$config['log_pruning'] = array(
'admin_logs' => 365, // Administrator logs
'mod_logs' => 365, // Moderator logs

\$config['log_pruning'] = array(
'admin_logs' => 365, // Administrator logs
'mod_logs' => 365, // Moderator logs

Zeile 1639Zeile 1636

\$config['disallowed_remote_hosts'] = array(
'localhost',


\$config['disallowed_remote_hosts'] = array(
'localhost',

);

);


/**
* Disallowed Remote Addresses


/**
* Disallowed Remote Addresses

Zeile 1653Zeile 1650
 */

\$config['disallowed_remote_addresses'] = array(

 */

\$config['disallowed_remote_addresses'] = array(

	'127.0.0.1',


	'0.0.0.0',
'127.0.0.0/8',

	'10.0.0.0/8',
'172.16.0.0/12',
'192.168.0.0/16',
);

";

	'10.0.0.0/8',
'172.16.0.0/12',
'192.168.0.0/16',
);

";





	$file = fopen(MYBB_ROOT.'inc/config.php', 'w');
fwrite($file, $configdata);
fclose($file);

	$file = fopen(MYBB_ROOT.'inc/config.php', 'w');
fwrite($file, $configdata);
fclose($file);

Zeile 1668Zeile 1666
	if(function_exists('opcache_invalidate'))
{
opcache_invalidate(MYBB_ROOT."inc/config.php");

	if(function_exists('opcache_invalidate'))
{
opcache_invalidate(MYBB_ROOT."inc/config.php");

	}


	}


	// Error reporting back on
$db->error_reporting = 1;

	// Error reporting back on
$db->error_reporting = 1;





	$output->print_header($lang->table_creation, 'createtables');
echo $lang->sprintf($lang->tablecreate_step_connected, $dboptions[$mybb->input['dbengine']]['short_title'], $db->get_version());

if($dboptions[$mybb->input['dbengine']]['structure_file'])
{
$structure_file = $dboptions[$mybb->input['dbengine']]['structure_file'];

	$output->print_header($lang->table_creation, 'createtables');
echo $lang->sprintf($lang->tablecreate_step_connected, $dboptions[$mybb->input['dbengine']]['short_title'], $db->get_version());

if($dboptions[$mybb->input['dbengine']]['structure_file'])
{
$structure_file = $dboptions[$mybb->input['dbengine']]['structure_file'];

	}
else

	}
else

	{
$structure_file = 'mysql_db_tables.php';
}

	{
$structure_file = 'mysql_db_tables.php';
}

Zeile 1700Zeile 1698
		if(!empty($match[1]))
{
echo $lang->done . "<br />\n";

		if(!empty($match[1]))
{
echo $lang->done . "<br />\n";

		}

		}

	}
echo $lang->tablecreate_step_done;
$output->print_footer('populate_tables');

	}
echo $lang->tablecreate_step_done;
$output->print_footer('populate_tables');

Zeile 1782Zeile 1780

$contents = @file_get_contents(INSTALL_ROOT.'resources/mybb_theme.xml');
if(!empty($mybb->config['admin_dir']) && file_exists(MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions_themes.php"))


$contents = @file_get_contents(INSTALL_ROOT.'resources/mybb_theme.xml');
if(!empty($mybb->config['admin_dir']) && file_exists(MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions_themes.php"))

	{

	{

		require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php";
require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions_themes.php";
}

		require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php";
require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions_themes.php";
}

Zeile 1823Zeile 1821
				$exp = explode("=", $value['value']);

$properties['colors'][$exp[0]] = $exp[1];

				$exp = explode("=", $value['value']);

$properties['colors'][$exp[0]] = $exp[1];

			}
}


			}
}


		if(is_array($tree['colors']['stylesheets']))
{
$count = count($properties['disporder']) + 1;

		if(is_array($tree['colors']['stylesheets']))
{
$count = count($properties['disporder']) + 1;

Zeile 2157Zeile 2155

$db->insert_query("tasks", $new_task);
$taskcount++;


$db->insert_query("tasks", $new_task);
$taskcount++;

		}

		}


// For the version check task, set a random date and hour (so all MyBB installs don't query mybb.com all at the same time)
$update_array = array(


// For the version check task, set a random date and hour (so all MyBB installs don't query mybb.com all at the same time)
$update_array = array(

Zeile 2488Zeile 2486
	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)