Vergleich install/index.php - 1.8.27 - 1.8.39

  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
{

Zeile 1171Zeile 1170
	  	@my_chmod(MYBB_ROOT.'cache', '0777');
@my_chmod(MYBB_ROOT.'cache/test.write', '0777');
@unlink(MYBB_ROOT.'cache/test.write');

	  	@my_chmod(MYBB_ROOT.'cache', '0777');
@my_chmod(MYBB_ROOT.'cache/test.write', '0777');
@unlink(MYBB_ROOT.'cache/test.write');

	}

	}


// Check upload directory is writable
$uploadswritable = @fopen(MYBB_ROOT.'uploads/test.write', 'w');


// Check upload directory is writable
$uploadswritable = @fopen(MYBB_ROOT.'uploads/test.write', 'w');

Zeile 1179Zeile 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);

		$showerror = 1;


	}
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 1491Zeile 1488
	// Needs to be smaller then 64 characters total (MySQL Limit).
// This allows 24 characters for the actual table name, which should be sufficient.
if(strlen($config['tableprefix']) > 40)

	// Needs to be smaller then 64 characters total (MySQL Limit).
// This allows 24 characters for the actual table name, which should be sufficient.
if(strlen($config['tableprefix']) > 40)

	{

	{

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


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


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

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

		}

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

Zeile 1839Zeile 1837
					"lastmodified" => TIME_NOW,
"cachefile" => $db->escape_string($stylesheet['attributes']['name'])
);

					"lastmodified" => TIME_NOW,
"cachefile" => $db->escape_string($stylesheet['attributes']['name'])
);





				$sid = $db->insert_query("themestylesheets", $new_stylesheet);
$css_url = "css.php?stylesheet={$sid}";

$cached = cache_stylesheet($tid, $stylesheet['attributes']['name'], $stylesheet['value']);

				$sid = $db->insert_query("themestylesheets", $new_stylesheet);
$css_url = "css.php?stylesheet={$sid}";

$cached = cache_stylesheet($tid, $stylesheet['attributes']['name'], $stylesheet['value']);





				if($cached)
{
$css_url = $cached;

				if($cached)
{
$css_url = $cached;

Zeile 1885Zeile 1883
				{
var revertlink = ' <a href="javascript:revertSetting(\''+inp.defaultValue+'\', \'#'+inp.id+'\');">{$lang->config_step_revert}</a>';
parenttr.removeClass('last').after('<tr class="setting_peeker"><td colspan="2">'+warn+revertlink+'</td></tr>');

				{
var revertlink = ' <a href="javascript:revertSetting(\''+inp.defaultValue+'\', \'#'+inp.id+'\');">{$lang->config_step_revert}</a>';
parenttr.removeClass('last').after('<tr class="setting_peeker"><td colspan="2">'+warn+revertlink+'</td></tr>');

				}

				}

			} else {
parenttr.next('.setting_peeker').remove();
if(parenttr.is(':last-child'))
{
parenttr.addClass('last');
}

			} else {
parenttr.next('.setting_peeker').remove();
if(parenttr.is(':last-child'))
{
parenttr.addClass('last');
}

			}
}

			}
}


function revertSetting(defval, inpid)
{


function revertSetting(defval, inpid)
{

Zeile 1906Zeile 1904
			}
}
</script>

			}
}
</script>





EOF;

// If board configuration errors

EOF;

// If board configuration errors

Zeile 1968Zeile 1966
			$pos = strrpos($cookiedomain, $port);

if($pos !== false)

			$pos = strrpos($cookiedomain, $port);

if($pos !== false)

			{

			{

				$cookiedomain = substr($cookiedomain, 0, $pos);

				$cookiedomain = substr($cookiedomain, 0, $pos);

			}


			}


			if($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443 && !preg_match("#:[0-9]#i", $hostname))
{
$hostname .= $port;

			if($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443 && !preg_match("#:[0-9]#i", $hostname))
{
$hostname .= $port;

Zeile 1988Zeile 1986
		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;

		else
{
$contactemail = null;

Zeile 2028Zeile 2026
	echo <<<EOF
<script type="text/javascript">
function comparePass()

	echo <<<EOF
<script type="text/javascript">
function comparePass()

		{

		{

			var parenttr = $('#adminpass2').closest('tr');
var passval = $('#adminpass2').val();
if(passval && passval != $('#adminpass').val())

			var parenttr = $('#adminpass2').closest('tr');
var passval = $('#adminpass2').val();
if(passval && passval != $('#adminpass').val())

Zeile 2151Zeile 2149
				'month' => $db->escape_string($task['month'][0]['value']),
'enabled' => $db->escape_string($task['enabled'][0]['value']),
'logging' => $db->escape_string($task['logging'][0]['value'])

				'month' => $db->escape_string($task['month'][0]['value']),
'enabled' => $db->escape_string($task['enabled'][0]['value']),
'logging' => $db->escape_string($task['logging'][0]['value'])

			);


			);


			$new_task['nextrun'] = fetch_next_run($new_task);

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

			$new_task['nextrun'] = fetch_next_run($new_task);

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

Zeile 2328Zeile 2326
		'lastactive' => $now,
'lastvisit' => $now,
'website' => '',

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

		'icq' => '',

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

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

Zeile 2453Zeile 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 2461Zeile 2462
	$dh = opendir(INSTALL_ROOT."resources");
while(($file = readdir($dh)) !== false)
{

	$dh = opendir(INSTALL_ROOT."resources");
while(($file = readdir($dh)) !== false)
{

		if(preg_match("#upgrade([0-9]+).php$#i", $file, $match))

		if(preg_match("#upgrade(\d+(p\d+)*).php$#i", $file, $match))

		{
$version_history[$match[1]] = $match[1];
}
}

		{
$version_history[$match[1]] = $match[1];
}
}

	sort($version_history, SORT_NUMERIC);

	natsort($version_history);

	$cache->update("version_history", $version_history);

// Schedule an update check so it occurs an hour ago. Gotta stay up to date!

	$cache->update("version_history", $version_history);

// Schedule an update check so it occurs an hour ago. Gotta stay up to date!

Zeile 2484Zeile 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)