Vergleich install/index.php - 1.8.11 - 1.8.22

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 56Zeile 56
require_once MYBB_ROOT.'inc/functions_user.php';
require_once MYBB_ROOT.'inc/class_language.php';
$lang = new MyLanguage();

require_once MYBB_ROOT.'inc/functions_user.php';
require_once MYBB_ROOT.'inc/class_language.php';
$lang = new MyLanguage();

$lang->set_path(MYBB_ROOT.'install/resources');

$lang->set_path(INSTALL_ROOT.'resources');

$lang->load('language');

// Load DB interface

$lang->load('language');

// Load DB interface

Zeile 106Zeile 106
		'title' => 'PostgreSQL',
'short_title' => 'PostgreSQL',
'structure_file' => 'pgsql_db_tables.php',

		'title' => 'PostgreSQL',
'short_title' => 'PostgreSQL',
'structure_file' => 'pgsql_db_tables.php',

		'population_file' => 'mysql_db_inserts.php'

		'population_file' => 'pgsql_db_inserts.php'

	);

	);

}


}


if(class_exists('PDO'))

if(class_exists('PDO'))

{

{

	$supported_dbs = PDO::getAvailableDrivers();
if(in_array('sqlite', $supported_dbs))
{

	$supported_dbs = PDO::getAvailableDrivers();
if(in_array('sqlite', $supported_dbs))
{

Zeile 120Zeile 120
			'title' => 'SQLite 3',
'short_title' => 'SQLite',
'structure_file' => 'sqlite_db_tables.php',

			'title' => 'SQLite 3',
'short_title' => 'SQLite',
'structure_file' => 'sqlite_db_tables.php',

			'population_file' => 'mysql_db_inserts.php'

			'population_file' => 'pgsql_db_inserts.php'

		);
}
}

		);
}
}

Zeile 128Zeile 128
if(file_exists('lock') && $mybb->dev_mode != true)
{
$output->print_error($lang->locked);

if(file_exists('lock') && $mybb->dev_mode != true)
{
$output->print_error($lang->locked);

}

}

else if($installed == true && empty($mybb->input['action']))
{
$output->print_header($lang->already_installed, "errormsg", 0);

else if($installed == true && empty($mybb->input['action']))
{
$output->print_header($lang->already_installed, "errormsg", 0);

Zeile 149Zeile 149
		'adminuser' => $lang->admin_user,
'final' => $lang->finish_setup,
);

		'adminuser' => $lang->admin_user,
'final' => $lang->finish_setup,
);





	switch($mybb->get_input('action'))
{
case 'license':

	switch($mybb->get_input('action'))
{
case 'license':

Zeile 192Zeile 192
function intro()
{
global $output, $mybb, $lang;

function intro()
{
global $output, $mybb, $lang;





	$output->print_header();
if(strpos(strtolower(get_current_location('', '', true)), '/upload/') !== false)
{

	$output->print_header();
if(strpos(strtolower(get_current_location('', '', true)), '/upload/') !== false)
{

Zeile 279Zeile 279
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:

that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:





   a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs

   a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs

Zeile 793Zeile 793
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.





  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

Zeile 1307Zeile 1307
			$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}\">


$db_info[$dbfile] = "
<tbody id=\"{$dbfile}_settings\" class=\"db_settings db_type{$class}\">

Zeile 1319Zeile 1319

// SQLite gets some special settings
if($dbfile == 'sqlite')


// SQLite gets some special settings
if($dbfile == 'sqlite')

		{
$db_info[$dbfile] .= "

		{
$db_info[$dbfile] .= "

				<tr class=\"alt_row\">
<td class=\"first\"><label for=\"config_{$dbfile}_dbname\">{$lang->database_path}</label></td>
<td class=\"last alt_col\"><input type=\"text\" class=\"text_input\" name=\"config[{$dbfile}][dbname]\" id=\"config_{$dbfile}_dbname\" value=\"".htmlspecialchars_uni($mybb->input['config'][$dbfile]['dbname'])."\" /></td>

				<tr class=\"alt_row\">
<td class=\"first\"><label for=\"config_{$dbfile}_dbname\">{$lang->database_path}</label></td>
<td class=\"last alt_col\"><input type=\"text\" class=\"text_input\" name=\"config[{$dbfile}][dbname]\" id=\"config_{$dbfile}_dbname\" value=\"".htmlspecialchars_uni($mybb->input['config'][$dbfile]['dbname'])."\" /></td>

Zeile 1328Zeile 1328
		}
// Others get db host, username, password etc
else

		}
// Others get db host, username, password etc
else

		{
$db_info[$dbfile] .= "

		{
$db_info[$dbfile] .= "

				<tr class=\"alt_row\">
<td class=\"first\"><label for=\"config_{$dbfile}_dbhost\">{$lang->database_host}</label></td>
<td class=\"last alt_col\"><input type=\"text\" class=\"text_input\" name=\"config[{$dbfile}][dbhost]\" id=\"config_{$dbfile}_dbhost\" value=\"".htmlspecialchars_uni($mybb->input['config'][$dbfile]['dbhost'])."\" /></td>

				<tr class=\"alt_row\">
<td class=\"first\"><label for=\"config_{$dbfile}_dbhost\">{$lang->database_host}</label></td>
<td class=\"last alt_col\"><input type=\"text\" class=\"text_input\" name=\"config[{$dbfile}][dbhost]\" id=\"config_{$dbfile}_dbhost\" value=\"".htmlspecialchars_uni($mybb->input['config'][$dbfile]['dbhost'])."\" /></td>

Zeile 1443Zeile 1443
	$connection = $db->connect($connect_array);
if($connection === false)
{

	$connection = $db->connect($connect_array);
if($connection === false)
{

		$errors[] = $lang->sprintf($lang->db_step_error_noconnect, $config['dbhost']);

		$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']))
{

	}
// 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, $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.

	}

// Most DB engines only allow certain characters in the table name. Oracle requires an alphabetic character first.

Zeile 1477Zeile 1477
	// Decide if we can use a database encoding or not
if($db->fetch_db_charsets() != false)
{

	// Decide if we can use a database encoding or not
if($db->fetch_db_charsets() != false)
{

		$db_encoding = "\$config['database']['encoding'] = '{$config['encoding']}';";

		$db_encoding = "\$config['database']['encoding'] = '".addcslashes($config['encoding'], "'")."';";

	}
else
{

	}
else
{

		$db_encoding = "// \$config['database']['encoding'] = '{$config['encoding']}';";

		$db_encoding = "// \$config['database']['encoding'] = '".addcslashes($config['encoding'], "'")."';";

	}

	}


$config['dbpass'] = addslashes($config['dbpass']);

 

// Write the configuration file
$configdata = "<?php


// Write the configuration file
$configdata = "<?php

Zeile 1496Zeile 1494
 * https://docs.mybb.com/
*/


 * https://docs.mybb.com/
*/


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

\$config['database']['type'] = '".addcslashes($mybb->input['dbengine'], "'")."';
\$config['database']['database'] = '".addcslashes($config['dbname'], "'")."';
\$config['database']['table_prefix'] = '".addcslashes($config['tableprefix'], "'")."';





\$config['database']['hostname'] = '{$config['dbhost']}';
\$config['database']['username'] = '{$config['dbuser']}';
\$config['database']['password'] = '{$config['dbpass']}';

\$config['database']['hostname'] = '".addcslashes($config['dbhost'], "'")."';
\$config['database']['username'] = '".addcslashes($config['dbuser'], "'")."';
\$config['database']['password'] = '".addcslashes($config['dbpass'], "'")."';


/**
* Admin CP directory


/**
* Admin CP directory

Zeile 1669Zeile 1667
 */
function populate_tables()
{

 */
function populate_tables()
{

	global $output, $lang;

	global $output, $lang, $dboptions;


require MYBB_ROOT.'inc/config.php';
$db = db_connection($config);


require MYBB_ROOT.'inc/config.php';
$db = db_connection($config);

Zeile 2284Zeile 2282
		'lastvisit' => $now,
'website' => '',
'icq' => '',

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

		'aim' => '',
'yahoo' => '',

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

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

Zeile 2370Zeile 2366
	// Automatic Login
my_unsetcookie("sid");
my_unsetcookie("mybbuser");

	// Automatic Login
my_unsetcookie("sid");
my_unsetcookie("mybbuser");

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

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

	ob_end_flush();

// Make fulltext columns if supported

	ob_end_flush();

// Make fulltext columns if supported

Zeile 2517Zeile 2513
	$query = $db->simple_select('settings', '*', '', array('order_by' => 'title'));
while($setting = $db->fetch_array($query))
{

	$query = $db->simple_select('settings', '*', '', array('order_by' => 'title'));
while($setting = $db->fetch_array($query))
{

		$setting['value'] = str_replace("\"", "\\\"", $setting['value']);


		$setting['name'] = addcslashes($setting['name'], "\\'");
$setting['value'] = addcslashes($setting['value'], '\\"$');

		$settings .= "\$settings['{$setting['name']}'] = \"{$setting['value']}\";\n";
}
if(!empty($settings))

		$settings .= "\$settings['{$setting['name']}'] = \"{$setting['value']}\";\n";
}
if(!empty($settings))