Vergleich install/index.php - 1.6.2 - 1.6.8

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: index.php 5092 2010-07-17 11:09:40Z Huji $

 * $Id: index.php 5816 2012-04-23 15:42:18Z Tomm $

 */

if(function_exists("unicode_decode"))

 */

if(function_exists("unicode_decode"))

Zeile 1385Zeile 1385
	
if(strstr($mybb->input['dbengine'], "sqlite") !== false)
{

	
if(strstr($mybb->input['dbengine'], "sqlite") !== false)
{

		if(strstr($config['dbname'], "./") !== false || strstr($config['dbname'], "../") !== false)

		if(strstr($config['dbname'], "./") !== false || strstr($config['dbname'], "../") !== false || empty($config['dbname']))

		{
$errors[] = $lang->db_step_error_sqlite_invalid_dbname;
database_info();

		{
$errors[] = $lang->db_step_error_sqlite_invalid_dbname;
database_info();

Zeile 1464Zeile 1464
 *
* Please see the MyBB Wiki for advanced
* database configuration for larger installations

 *
* Please see the MyBB Wiki for advanced
* database configuration for larger installations

 * http://wiki.mybboard.net/

 * http://wiki.mybb.com/

 */

\$config['database']['type'] = '{$mybb->input['dbengine']}';

 */

\$config['database']['type'] = '{$mybb->input['dbengine']}';

Zeile 1625Zeile 1625
		$db->query($val);
}


		$db->query($val);
}


	// Update the fid sequence for PgSQL

	// Update the sequences for PgSQL

	if($config['database']['type'] == "pgsql")
{

	if($config['database']['type'] == "pgsql")
{

		$db->query("ALTER SEQUENCE ".$config['database']['table_prefix']."forums_fid_seq RESTART WITH 3");









		$db->query("SELECT setval('{$config['database']['table_prefix']}attachtypes_atid_seq', (SELECT max(atid) FROM {$config['database']['table_prefix']}attachtypes));");
$db->query("SELECT setval('{$config['database']['table_prefix']}forums_fid_seq', (SELECT max(fid) FROM {$config['database']['table_prefix']}forums));");
$db->query("SELECT setval('{$config['database']['table_prefix']}helpdocs_hid_seq', (SELECT max(hid) FROM {$config['database']['table_prefix']}helpdocs));");
$db->query("SELECT setval('{$config['database']['table_prefix']}helpsections_sid_seq', (SELECT max(sid) FROM {$config['database']['table_prefix']}helpsections));");
$db->query("SELECT setval('{$config['database']['table_prefix']}icons_iid_seq', (SELECT max(iid) FROM {$config['database']['table_prefix']}icons));");
$db->query("SELECT setval('{$config['database']['table_prefix']}profilefields_fid_seq', (SELECT max(fid) FROM {$config['database']['table_prefix']}profilefields));");
$db->query("SELECT setval('{$config['database']['table_prefix']}smilies_sid_seq', (SELECT max(sid) FROM {$config['database']['table_prefix']}smilies));");
$db->query("SELECT setval('{$config['database']['table_prefix']}spiders_sid_seq', (SELECT max(sid) FROM {$config['database']['table_prefix']}spiders));");
$db->query("SELECT setval('{$config['database']['table_prefix']}templategroups_gid_seq', (SELECT max(gid) FROM {$config['database']['table_prefix']}templategroups));");

	}

echo $lang->populate_step_inserted;

	}

echo $lang->populate_step_inserted;

Zeile 1715Zeile 1723
		$websiteurl = $hostname.'/';
$websitename = 'Your Website';
$contactemail = '';

		$websiteurl = $hostname.'/';
$websitename = 'Your Website';
$contactemail = '';

 

$protocol = "http://";
if((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != "off") || substr($bburl, 0, 5) == "https")
{
$protocol = "https://";
}


		// Attempt auto-detection
if($_SERVER['HTTP_HOST'])
{

		// Attempt auto-detection
if($_SERVER['HTTP_HOST'])
{

			$hostname = 'http://'.$_SERVER['HTTP_HOST'];

			$hostname = $protocol.$_SERVER['HTTP_HOST'];

			$cookiedomain = '.'.$_SERVER['HTTP_HOST'];
}
elseif($_SERVER['SERVER_NAME'])
{

			$cookiedomain = '.'.$_SERVER['HTTP_HOST'];
}
elseif($_SERVER['SERVER_NAME'])
{

			$hostname = 'http://'.$_SERVER['SERVER_NAME'];

			$hostname = $protocol.$_SERVER['SERVER_NAME'];

			$cookiedomain = '.'.$_SERVER['SERVER_NAME'];
}


			$cookiedomain = '.'.$_SERVER['SERVER_NAME'];
}


Zeile 1732Zeile 1747
			$cookiedomain = my_substr($cookiedomain, 4);
}


			$cookiedomain = my_substr($cookiedomain, 4);
}


		if($_SERVER['HTTP_HOST'] == 'localhost' || $_SERVER['SERVER_NAME'] == 'localhost')

		if($_SERVER['HTTP_HOST'] == 'localhost' || $_SERVER['SERVER_NAME'] == 'localhost' || ip2long($_SERVER['SERVER_NAME']) != false)

		{
$cookiedomain = '';
}

		{
$cookiedomain = '';
}

Zeile 1837Zeile 1852
					'optionscode' => $db->escape_string($setting['optionscode'][0]['value']),
'value' => $db->escape_string($setting['settingvalue'][0]['value']),
'disporder' => intval($setting['disporder'][0]['value']),

					'optionscode' => $db->escape_string($setting['optionscode'][0]['value']),
'value' => $db->escape_string($setting['settingvalue'][0]['value']),
'disporder' => intval($setting['disporder'][0]['value']),

					'gid' => $gid


					'gid' => $gid,
'isdefault' => 1

				);

$db->insert_query('settings', $settingdata);

				);

$db->insert_query('settings', $settingdata);

Zeile 1906Zeile 1922
			{
$fields[] = $field['attributes']['name'];
}

			{
$fields[] = $field['attributes']['name'];
}

 


			$conditions = array();

			$conditions = array();

			

 
			if(is_array($view['conditions'][0]['condition']))

			if(is_array($view['conditions'][0]['condition']))

			{

			{

				foreach($view['conditions'][0]['condition'] as $condition)

				foreach($view['conditions'][0]['condition'] as $condition)

				{

				{

					if(!$condition['value']) continue;
if($condition['attributes']['is_serialized'] == 1)
{
$condition['value'] = unserialize($condition['value']);
}
$conditions[$condition['attributes']['name']] = $condition['value'];

					if(!$condition['value']) continue;
if($condition['attributes']['is_serialized'] == 1)
{
$condition['value'] = unserialize($condition['value']);
}
$conditions[$condition['attributes']['name']] = $condition['value'];

				}










				}
}

$custom_profile_fields = array();
if(is_array($view['custom_profile_fields'][0]['field']))
{
foreach($view['custom_profile_fields'][0]['field'] as $field)
{
$custom_profile_fields[] = $field['attributes']['name'];
}

			}

$new_view = array(

			}

$new_view = array(

Zeile 1928Zeile 1953
				"title" => $db->escape_string($view['title'][0]['value']),
"fields" => $db->escape_string(serialize($fields)),
"conditions" => $db->escape_string(serialize($conditions)),

				"title" => $db->escape_string($view['title'][0]['value']),
"fields" => $db->escape_string(serialize($fields)),
"conditions" => $db->escape_string(serialize($conditions)),

 
				"custom_profile_fields" => $db->escape_string(serialize($custom_profile_fields)),

				"sortby" => $db->escape_string($view['sortby'][0]['value']),
"sortorder" => $db->escape_string($view['sortorder'][0]['value']),
"perpage" => intval($view['perpage'][0]['value']),

				"sortby" => $db->escape_string($view['sortby'][0]['value']),
"sortorder" => $db->escape_string($view['sortorder'][0]['value']),
"perpage" => intval($view['perpage'][0]['value']),

Zeile 1983Zeile 2009
	echo $lang->done_step_usergroupsinserted;

// Insert all of our user groups from the XML file

	echo $lang->done_step_usergroupsinserted;

// Insert all of our user groups from the XML file

	$settings = file_get_contents(INSTALL_ROOT.'resources/usergroups.xml');
$parser = new XMLParser($settings);

	$usergroup_settings = file_get_contents(INSTALL_ROOT.'resources/usergroups.xml');
$parser = new XMLParser($usergroup_settings);

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


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


Zeile 2016Zeile 2042
	// Restart usergroup sequence with correct # of groups
if($config['database']['type'] == "pgsql")
{

	// Restart usergroup sequence with correct # of groups
if($config['database']['type'] == "pgsql")
{

		$pgsql_group_count = $group_count + 1;
$db->query("ALTER SEQUENCE ".$config['database']['table_prefix']."usergroups_gid_seq RESTART WITH ".$pgsql_group_count."");

		$db->query("SELECT setval('{$config['database']['table_prefix']}usergroups_gid_seq', (SELECT max(gid) FROM {$config['database']['table_prefix']}usergroups));");


	}

echo $lang->done . '</p>';

	}

echo $lang->done . '</p>';

Zeile 2124Zeile 2149
	my_unsetcookie("mybbuser");
my_setcookie('mybbuser', $uid.'_'.$loginkey, null, true);
ob_end_flush();

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





	// Make fulltext columns if supported
if($db->supports_fulltext('threads'))

	// Make fulltext columns if supported
if($db->supports_fulltext('threads'))

	{

	{

		$db->create_fulltext_index('threads', 'subject');

		$db->create_fulltext_index('threads', 'subject');

	}

	}

	if($db->supports_fulltext_boolean('posts'))
{
$db->create_fulltext_index('posts', 'message');
}

	if($db->supports_fulltext_boolean('posts'))
{
$db->create_fulltext_index('posts', 'message');
}


// Register a shutdown function which actually tests if this functionality is working
add_shutdown('test_shutdown_function');

 

echo $lang->done_step_cachebuilding;
require_once MYBB_ROOT.'inc/class_datacache.php';


echo $lang->done_step_cachebuilding;
require_once MYBB_ROOT.'inc/class_datacache.php';

Zeile 2159Zeile 2181
	$cache->update_spiders();
$cache->update_bannedips();
$cache->update_banned();

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

 
	$cache->update_bannedemails();

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

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

 
	$cache->update_threadprefixes();
$cache->update_forumsdisplay();

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


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


Zeile 2255Zeile 2280
		fwrite($file, $settings);
fclose($file);
}

		fwrite($file, $settings);
fclose($file);
}

}

function test_shutdown_function()
{
global $db;

$db->update_query("settings", array('value' => 1), "name='useshutdownfunc'");
write_settings();

 
}
?>

}
?>