Vergleich install/index.php - 1.6.1 - 1.6.5

  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 5591 2011-09-14 08:05:39Z 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']) || 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 1767Zeile 1782
		if($_SERVER['SERVER_ADMIN'])
{
$contactemail = $_SERVER['SERVER_ADMIN'];

		if($_SERVER['SERVER_ADMIN'])
{
$contactemail = $_SERVER['SERVER_ADMIN'];

		}

		}

	}

echo $lang->sprintf($lang->config_step_table, $bbname, $bburl, $websitename, $websiteurl, $cookiedomain, $cookiepath, $contactemail);

	}

echo $lang->sprintf($lang->config_step_table, $bbname, $bburl, $websitename, $websiteurl, $cookiedomain, $cookiepath, $contactemail);

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);
$settingcount++;

				);

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

			}
}


			}
}


		if(my_substr($mybb->input['bburl'], -1, 1) == '/')
{
$mybb->input['bburl'] = my_substr($mybb->input['bburl'], 0, -1);

		if(my_substr($mybb->input['bburl'], -1, 1) == '/')
{
$mybb->input['bburl'] = my_substr($mybb->input['bburl'], 0, -1);

Zeile 1862Zeile 1878
		write_settings();

echo $lang->sprintf($lang->admin_step_insertesettings, $settingcount, $groupcount);

		write_settings();

echo $lang->sprintf($lang->admin_step_insertesettings, $settingcount, $groupcount);





		include_once MYBB_ROOT."inc/functions_task.php";
$tasks = file_get_contents(INSTALL_ROOT.'resources/tasks.xml');
$parser = new XMLParser($tasks);

		include_once MYBB_ROOT."inc/functions_task.php";
$tasks = file_get_contents(INSTALL_ROOT.'resources/tasks.xml');
$parser = new XMLParser($tasks);

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


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


		// Insert scheduled tasks
foreach($tree['tasks'][0]['task'] as $task)
{

		// Insert scheduled tasks
foreach($tree['tasks'][0]['task'] as $task)
{

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

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

 


			$conditions = array();

			$conditions = array();

			

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

			if(is_array($view['conditions'][0]['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'];

				}
}


				}
}


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 2159Zeile 2184
	$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)));