Vergleich install/index.php - 1.6.4 - 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 5404 2011-03-19 01:17:10Z jammerx2 $

 * $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 1723Zeile 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 1740Zeile 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 1775Zeile 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);
$output->print_footer('adminuser');


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

Zeile 1795Zeile 1802
			$errors[] = $lang->config_step_error_url;
}
if(empty($mybb->input['bbname']))

			$errors[] = $lang->config_step_error_url;
}
if(empty($mybb->input['bbname']))

		{

		{

			$errors[] = $lang->config_step_error_name;
}
if(is_array($errors))
{
configure();

			$errors[] = $lang->config_step_error_name;
}
if(is_array($errors))
{
configure();

		}

		}

	}
$output->print_header($lang->create_admin, 'admin');


	}
$output->print_header($lang->create_admin, 'admin');


Zeile 1826Zeile 1833

// Insert all the settings
foreach($tree['settings'][0]['settinggroup'] as $settinggroup)


// Insert all the settings
foreach($tree['settings'][0]['settinggroup'] as $settinggroup)

		{

		{

			$groupdata = array(
'name' => $db->escape_string($settinggroup['attributes']['name']),
'title' => $db->escape_string($settinggroup['attributes']['title']),

			$groupdata = array(
'name' => $db->escape_string($settinggroup['attributes']['name']),
'title' => $db->escape_string($settinggroup['attributes']['title']),

Zeile 1851Zeile 1858

$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 1875Zeile 1882
		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 1895Zeile 1902
			);

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

			);

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





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

echo $lang->sprintf($lang->admin_step_insertedtasks, $taskcount);

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

echo $lang->sprintf($lang->admin_step_insertedtasks, $taskcount);





		$views = file_get_contents(INSTALL_ROOT.'resources/adminviews.xml');
$parser = new XMLParser($views);
$parser->collapse_dups = 0;

		$views = file_get_contents(INSTALL_ROOT.'resources/adminviews.xml');
$parser = new XMLParser($views);
$parser->collapse_dups = 0;

Zeile 1914Zeile 1921
			foreach($view['fields'][0]['field'] as $field)
{
$fields[] = $field['attributes']['name'];

			foreach($view['fields'][0]['field'] as $field)
{
$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 1937Zeile 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']),