Vergleich install/index.php - 1.8.28 - 1.8.37

  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', '<'))
{

Zeile 1823Zeile 1820
				$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 2154

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