Vergleich install/index.php - 1.2.0 - 1.2.11

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 3Zeile 3
 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html

 *

 *

 * $Id: index.php 2191 2006-09-03 12:11:04Z chris $

 * $Id: index.php 3256 2007-07-31 19:31:05Z Tikitiki $

 */
error_reporting(E_ALL & ~E_NOTICE);


 */
error_reporting(E_ALL & ~E_NOTICE);


define("MYBB_ROOT", dirname(dirname(__FILE__)));

define('MYBB_ROOT', dirname(dirname(__FILE__))."/");

define("INSTALL_ROOT", dirname(__FILE__));


define("INSTALL_ROOT", dirname(__FILE__));


require_once MYBB_ROOT.'/inc/class_core.php';

require_once MYBB_ROOT.'inc/class_core.php';

$mybb = new MyBB;

// Include the files necessary for installation

$mybb = new MyBB;

// Include the files necessary for installation

require_once MYBB_ROOT.'/inc/class_timers.php';
require_once MYBB_ROOT.'/inc/functions.php';
require_once MYBB_ROOT.'/admin/adminfunctions.php';
require_once MYBB_ROOT.'/inc/class_xml.php';
require_once MYBB_ROOT.'/inc/functions_user.php';
require_once MYBB_ROOT.'/inc/class_language.php';

require_once MYBB_ROOT.'inc/class_timers.php';
require_once MYBB_ROOT.'inc/functions.php';
require_once MYBB_ROOT.'admin/adminfunctions.php';
require_once MYBB_ROOT.'inc/class_xml.php';
require_once MYBB_ROOT.'inc/functions_user.php';
require_once MYBB_ROOT.'inc/class_language.php';

$lang = new MyLanguage();

$lang = new MyLanguage();

$lang->set_path('.');
$lang->language = 'resources';

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


$lang->load('language');

// Include the necessary contants for installation

$lang->load('language');

// Include the necessary contants for installation

Zeile 39Zeile 38
$output = new installerOutput;

$dboptions = array();

$output = new installerOutput;

$dboptions = array();


// Get the current working directory
$cwd = getcwd();

 

if(function_exists('mysqli_connect'))


if(function_exists('mysqli_connect'))

{

{

	$dboptions['mysqli'] = array(
'title' => 'MySQL Improved',

	$dboptions['mysqli'] = array(
'title' => 'MySQL Improved',

		'structure_file' => 'mysql_db_tables.php',
'population_file' => 'mysql_db_inserts.php'
);
}

		'structure_file' => 'mysql_db_tables.php',
'population_file' => 'mysql_db_inserts.php'
);
}


if(function_exists('mysql_connect'))
{


if(function_exists('mysql_connect'))
{

Zeile 59Zeile 55
		'structure_file' => 'mysql_db_tables.php',
'population_file' => 'mysql_db_inserts.php'
);

		'structure_file' => 'mysql_db_tables.php',
'population_file' => 'mysql_db_inserts.php'
);

 
}

// Perform a check if MyBB is already installed or not
$installed = false;
if(file_exists(MYBB_ROOT."/inc/config.php") && file_exists(MYBB_ROOT."/inc/settings.php"))
{
require MYBB_ROOT."/inc/config.php";
require MYBB_ROOT."/inc/settings.php";
if(is_array($config) && is_array($settings))
{
$installed = true;
}

}

if(file_exists('lock'))
{
$output->print_error($lang->locked);

}

if(file_exists('lock'))
{
$output->print_error($lang->locked);

 
}
else if($installed == true && !$mybb->input['action'])
{
$output->print_header($lang->already_installed, "errormsg", 0);
echo sprintf($lang->mybb_already_installed, $mybb->version);
$output->print_footer();

}
else
{

}
else
{

Zeile 217Zeile 231
	}

// Check config file is writable

	}

// Check config file is writable

	$configwritable = @fopen(MYBB_ROOT.'/inc/config.php', 'w');

	$configwritable = @fopen(MYBB_ROOT.'inc/config.php', 'w');

	if(!$configwritable)
{
$errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_configfile);

	if(!$configwritable)
{
$errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_configfile);

Zeile 231Zeile 245
	@fclose($configwritable);

// Check settings file is writable

	@fclose($configwritable);

// Check settings file is writable

	$settingswritable = @fopen(MYBB_ROOT.'/inc/settings.php', 'w');

	$settingswritable = @fopen(MYBB_ROOT.'inc/settings.php', 'w');

	if(!$settingswritable)
{
$errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_settingsfile);

	if(!$settingswritable)
{
$errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_settingsfile);

Zeile 245Zeile 259
	@fclose($settingswritable);

// Check upload directory is writable

	@fclose($settingswritable);

// Check upload directory is writable

	$uploadswritable = @fopen(MYBB_ROOT.'/uploads/test.write', 'w');

	$uploadswritable = @fopen(MYBB_ROOT.'uploads/test.write', 'w');

	if(!$uploadswritable)
{
$errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_uploaddir);

	if(!$uploadswritable)
{
$errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_uploaddir);

Zeile 257Zeile 271
	{
$uploadsstatus = sprintf($lang->req_step_span_pass, $lang->writable);
@fclose($uploadswritable);

	{
$uploadsstatus = sprintf($lang->req_step_span_pass, $lang->writable);
@fclose($uploadswritable);

	  @chmod(MYBB_ROOT.'/uploads', 0777);
@chmod(MYBB_ROOT.'/uploads/test.write', 0777);
@unlink(MYBB_ROOT.'/uploads/test.write');

	  	@chmod(MYBB_ROOT.'uploads', 0777);
@chmod(MYBB_ROOT.'uploads/test.write', 0777);
@unlink(MYBB_ROOT.'uploads/test.write');

	}

// Check avatar directory is writable

	}

// Check avatar directory is writable

	$avatarswritable = @fopen(MYBB_ROOT.'/uploads/avatars/test.write', 'w');

	$avatarswritable = @fopen(MYBB_ROOT.'uploads/avatars/test.write', 'w');

	if(!$avatarswritable)
{
$errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_avatardir);

	if(!$avatarswritable)
{
$errors[] = sprintf($lang->req_step_error_box, $lang->req_step_error_avatardir);

Zeile 275Zeile 289
	{
$avatarsstatus = sprintf($lang->req_step_span_pass, $lang->writable);
@fclose($avatarswritable);

	{
$avatarsstatus = sprintf($lang->req_step_span_pass, $lang->writable);
@fclose($avatarswritable);

		@chmod(MYBB_ROOT.'/uploads/avatars', 0777);
@chmod(MYBB_ROOT.'/uploads/avatars/test.write', 0777);
@unlink(MYBB_ROOT.'/uploads/avatars/test.write');
}

		@chmod(MYBB_ROOT.'uploads/avatars', 0777);
@chmod(MYBB_ROOT.'uploads/avatars/test.write', 0777);
@unlink(MYBB_ROOT.'uploads/avatars/test.write');
}



// Output requirements page



// Output requirements page

Zeile 304Zeile 318
	$output->print_header($lang->db_config, 'dbconfig');

// Check for errors from this stage

	$output->print_header($lang->db_config, 'dbconfig');

// Check for errors from this stage

	if(is_array($errors))

	if(is_array($errors))

	{
$error_list = error_list($errors);
echo sprintf($lang->db_step_error_config, $error_list);

	{
$error_list = error_list($errors);
echo sprintf($lang->db_step_error_config, $error_list);

 
		$dbengine = $mybb->input['dbengine'];

		$dbhost = $mybb->input['dbhost'];
$dbuser = $mybb->input['dbuser'];
$dbname = $mybb->input['dbname'];
$tableprefix = $mybb->input['tableprefix'];

		$dbhost = $mybb->input['dbhost'];
$dbuser = $mybb->input['dbuser'];
$dbname = $mybb->input['dbname'];
$tableprefix = $mybb->input['tableprefix'];

 
		$encoding = $mybb->input['encoding'];

	}
else
{

	}
else
{

Zeile 320Zeile 336
		$tableprefix = 'mybb_';
$dbuser = '';
$dbname = '';

		$tableprefix = 'mybb_';
$dbuser = '';
$dbname = '';

 
		$dbengine = 'mysql';
$encoding = 'utf8';

	}

// Loop through database engines
foreach($dboptions as $dbfile => $dbtype)
{

	}

// Loop through database engines
foreach($dboptions as $dbfile => $dbtype)
{

		$dbengines .= "<option value=\"{$dbfile}\">{$dbtype['title']}</option>";




























































		if($dbengine != '' && $dbengine == $dbfile)
{
$dbengines .= "<option value=\"{$dbfile}\" selected=\"selected\">{$dbtype['title']}</option>";
}
else
{
$dbengines .= "<option value=\"{$dbfile}\">{$dbtype['title']}</option>";
}
}

$encodings_array = array(
'big5' => 'Big5 Traditional Chinese',
'dec8' => 'DEC West European',
'cp850' => 'DOS West European',
'hp8' => 'HP West European',
'koi8r' => 'KOI8-R Relcom Russian',
'latin1' => 'cp1252 West European',
'latin2' => 'ISO 8859-2 Central European',
'swe7' => '7bit Swedish',
'ascii' => 'US ASCII',
'ujis' => 'EUC-JP Japanese',
'sjis' => 'Shift-JIS Japanese',
'hebrew' => 'ISO 8859-8 Hebrew',
'tis620' => 'TIS620 Thai',
'euckr' => 'EUC-KR Korean',
'koi8u' => 'KOI8-U Ukrainian',
'gb2312' => 'GB2312 Simplified Chinese',
'greek' => 'ISO 8859-7 Greek',
'cp1250' => 'Windows Central European',
'gbk' => 'GBK Simplified Chinese',
'latin5' => 'ISO 8859-9 Turkish',
'armscii8' => 'ARMSCII-8 Armenian',
'utf8' => 'UTF-8 Unicode',
'ucs2' => 'UCS-2 Unicode',
'cp866' => 'DOS Russian',
'keybcs2' => 'DOS Kamenicky Czech-Slovak',
'macce' => 'Mac Central European',
'macroman' => 'Mac West European',
'cp852' => 'DOS Central European',
'latin7' => 'ISO 8859-13 Baltic',
'cp1251' => 'Windows Cyrillic',
'cp1256' => 'Windows Arabic',
'cp1257' => 'Windows Baltic',
'binary' => 'Binary pseudo charset',
'geostd8' => 'GEOSTD8 Georgian',
'cp932' => 'SJIS for Windows Japanese',
'eucjpms' => 'UJIS for Windows Japanese',
);

// Loop through database encodings
foreach($encodings_array as $key => $encodingtext)
{
if($key == $encoding)
{
$encodings .= "<option value=\"{$key}\" selected=\"selected\">{$encodingtext}</option>\n";
}
else
{
$encodings .= "<option value=\"{$key}\">{$encodingtext}</option>\n";
}

	}


	}


	echo sprintf($lang->db_step_config_table, $dbengines, $dbhost, $dbuser, $dbname, $tableprefix);

	echo sprintf($lang->db_step_config_table, $dbengines, $dbhost, $dbuser, $dbname, $tableprefix, $encodings);

	$output->print_footer('create_tables');
}

	$output->print_footer('create_tables');
}





function create_tables()
{
global $output, $dbinfo, $errors, $mybb, $dboptions, $lang;

function create_tables()
{
global $output, $dbinfo, $errors, $mybb, $dboptions, $lang;

 
	
if(!$mybb->input['encoding'])
{
$errors[] = $lang->db_step_error_missingencoding;
}





	if(!file_exists(MYBB_ROOT."/inc/db_{$mybb->input['dbengine']}.php"))

	if(!file_exists(MYBB_ROOT."inc/db_{$mybb->input['dbengine']}.php"))

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

// Attempt to connect to the db

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

// Attempt to connect to the db

	require_once MYBB_ROOT."/inc/db_{$mybb->input['dbengine']}.php";

	require_once MYBB_ROOT."inc/db_{$mybb->input['dbengine']}.php";

	$db = new databaseEngine;
$db->error_reporting = 0;

	$db = new databaseEngine;
$db->error_reporting = 0;





	$connection = $db->connect($mybb->input['dbhost'], $mybb->input['dbuser'], $mybb->input['dbpass']);
if(!$connection)
{

	$connection = $db->connect($mybb->input['dbhost'], $mybb->input['dbuser'], $mybb->input['dbpass']);
if(!$connection)
{

Zeile 358Zeile 440
	if(!$dbselect)
{
$errors[] = sprintf($lang->db_step_error_nodbname, $mybb->input['dbname']);

	if(!$dbselect)
{
$errors[] = sprintf($lang->db_step_error_nodbname, $mybb->input['dbname']);

	}

	}


if(is_array($errors))


if(is_array($errors))

	{

	{

		database_info();

		database_info();

 
	}

$collations = array(
'big5' => 'big5_chinese_ci',
'dec8' => 'dec8_swedish_ci',
'cp850' => 'cp850_general_ci',
'hp8' => 'hp8_english_ci',
'koi8r' => 'koi8r_general_ci',
'latin1' => 'latin1_swedish_ci',
'latin2' => 'latin2_general_ci',
'swe7' => 'swe7_swedish_ci',
'ascii' => 'ascii_general_ci',
'ujis' => 'ujis_japanese_ci',
'sjis' => 'sjis_japanese_ci',
'hebrew' => 'hebrew_general_ci',
'tis620' => 'tis620_thai_ci',
'euckr' => 'euckr_korean_ci',
'koi8u' => 'koi8u_general_ci',
'gb2312' => 'gb2312_chinese_ci',
'greek' => 'greek_general_ci',
'cp1250' => 'cp1250_general_ci',
'gbk' => 'gbk_chinese_ci',
'latin5' => 'latin5_turkish_ci',
'armscii8' => 'armscii8_general_ci',
'utf8' => 'utf8_general_ci',
'ucs2' => 'ucs2_general_ci',
'cp866' => 'cp866_general_ci',
'keybcs2' => 'keybcs2_general_ci',
'macce' => 'macce_general_ci',
'macroman' => 'macroman_general_ci',
'cp852' => 'cp852_general_ci',
'latin7' => 'latin7_general_ci',
'cp1251' => 'cp1251_general_ci',
'cp1256' => 'cp1256_general_ci',
'cp1257' => 'cp1257_general_ci',
'binary' => 'binary',
'geostd8' => 'geostd8_general_ci',
'cp932' => 'cp932_japanese_ci',
'eucjpms' => 'eucjpms_japanese_ci',
);

// Decide if we can use a database encoding or not
if(($db->title == "MySQLi" || $db->title == "MySQL") && $db->get_version() >= '4.1.0')
{
$db_encoding = "\$config['db_encoding'] = '{$mybb->input['encoding']}';";
$charset = " CHARACTER SET {$mybb->input['encoding']} COLLATE ".$collations[$mybb->input['encoding']];
}
else
{
$db_encoding = "// \$config['db_encoding'] = '{$mybb->input['encoding']}';";
$charset = "";

	}

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

	}

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

 * Daatabase configuration

 * Database configuration

 */

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

 */

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

Zeile 377Zeile 510
\$config['password'] = '{$mybb->input['dbpass']}';
\$config['database'] = '{$mybb->input['dbname']}';
\$config['table_prefix'] = '{$mybb->input['tableprefix']}';

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


/**


/**

 * Admin CP directory
* For security reasons, it is recommended you
* rename your Admin CP directory. You then need
* to adjust the value below to point to the
* new directory.

 * Admin CP directory
* For security reasons, it is recommended you
* rename your Admin CP directory. You then need
* to adjust the value below to point to the
* new directory.

 */

 */


\$config['admin_dir'] = 'admin';



\$config['admin_dir'] = 'admin';


Zeile 406Zeile 539
 *
* If you wish to use the file system (inc/cache directory)
* you can change the value below to 'files' from 'db'.

 *
* If you wish to use the file system (inc/cache directory)
* you can change the value below to 'files' from 'db'.

 */

\$config['cache_store'] = 'db';


 */

\$config['cache_store'] = 'db';


/**
* Super Administrators
* A comma separated list of user IDs who cannot
* be edited, deleted or banned in the Admin CP.
* The administrator permissions for these users
* cannot be altered either.

/**
* Super Administrators
* A comma separated list of user IDs who cannot
* be edited, deleted or banned in the Admin CP.
* The administrator permissions for these users
* cannot be altered either.

 */


 */


\$config['super_admins'] = '1';

\$config['super_admins'] = '1';

 

/**
* Database Encoding
* If you wish to set an encoding for MyBB uncomment
* the line below (if it isn't already) and change
* the current value to the mysql charset:
* http://dev.mysql.com/doc/refman/5.1/en/charset-mysql.html
*/

{$db_encoding}

 
?>";


 
?>";


	$file = fopen(MYBB_ROOT.'/inc/config.php', 'w');

	$file = fopen(MYBB_ROOT.'inc/config.php', 'w');

	fwrite($file, $configdata);
fclose($file);


	fwrite($file, $configdata);
fclose($file);


Zeile 460Zeile 603

function populate_tables()
{


function populate_tables()
{

	global $output, $lang;

	global $output, $lang, $config;





	require_once MYBB_ROOT.'/inc/config.php';

	require MYBB_ROOT.'inc/config.php';

	$db = db_connection($config);

$output->print_header($lang->table_population, 'tablepopulate');

	$db = db_connection($config);

$output->print_header($lang->table_population, 'tablepopulate');

Zeile 489Zeile 632

function insert_templates()
{


function insert_templates()
{

	global $output, $cache, $db, $lang;

	global $output, $cache, $db, $lang, $config;





	require_once MYBB_ROOT.'/inc/config.php';

	require MYBB_ROOT.'inc/config.php';

	$db = db_connection($config);


	$db = db_connection($config);


	require_once MYBB_ROOT.'/inc/class_datacache.php';

	require_once MYBB_ROOT.'inc/class_datacache.php';

	$cache = new datacache;

$output->print_header($lang->theme_installation, 'theme');

	$cache = new datacache;

$output->print_header($lang->theme_installation, 'theme');

Zeile 503Zeile 646

$db->query("DELETE FROM ".TABLE_PREFIX."themes");
$db->query("DELETE FROM ".TABLE_PREFIX."templates");


$db->query("DELETE FROM ".TABLE_PREFIX."themes");
$db->query("DELETE FROM ".TABLE_PREFIX."templates");

	$db->query("INSERT INTO ".TABLE_PREFIX."themes (name,pid,css,cssbits,themebits,extracss) VALUES ('MyBB Master Style','0','','','','')");
$db->query("INSERT INTO ".TABLE_PREFIX."themes (name,pid,def,css,cssbits,themebits,extracss) VALUES ('MyBB Default','1','1','','','','')");

	$db->query("INSERT INTO ".TABLE_PREFIX."themes (name,pid,css,cssbits,themebits,extracss,allowedgroups) VALUES ('MyBB Master Style','0','','','','','')");
$db->query("INSERT INTO ".TABLE_PREFIX."themes (name,pid,def,css,cssbits,themebits,extracss,allowedgroups) VALUES ('MyBB Default','1','1','','','','','')");

	$db->query("INSERT INTO ".TABLE_PREFIX."templatesets (title) VALUES ('Default Templates');");
$templateset = $db->insert_id();


	$db->query("INSERT INTO ".TABLE_PREFIX."templatesets (title) VALUES ('Default Templates');");
$templateset = $db->insert_id();


Zeile 585Zeile 728

function create_admin_user()
{


function create_admin_user()
{

	global $output, $mybb, $errors, $db, $lang;

	global $output, $mybb, $errors, $db, $lang, $config;

	$mybb->input['action'] = "adminuser";
// If no errors then check for errors from last step
if(!is_array($errors))

	$mybb->input['action'] = "adminuser";
// If no errors then check for errors from last step
if(!is_array($errors))

Zeile 614Zeile 757
	}
else
{

	}
else
{

		require_once MYBB_ROOT.'/inc/config.php';

		require MYBB_ROOT.'inc/config.php';

		$db = db_connection($config);

echo $lang->admin_step_setupsettings;

		$db = db_connection($config);

echo $lang->admin_step_setupsettings;

Zeile 679Zeile 822

function install_done()
{


function install_done()
{

	global $output, $db, $mybb, $errors, $cache, $lang;

	global $output, $db, $mybb, $errors, $cache, $lang, $config;


if(empty($mybb->input['adminuser']))
{


if(empty($mybb->input['adminuser']))
{

Zeile 702Zeile 845
		create_admin_user();
}


		create_admin_user();
}


	require_once MYBB_ROOT.'/inc/config.php';

	require MYBB_ROOT.'inc/config.php';

	$db = db_connection($config);


	$db = db_connection($config);


	require_once MYBB_ROOT.'/inc/settings.php';

	require MYBB_ROOT.'inc/settings.php';

	$mybb->settings = &$settings;

ob_start();

	$mybb->settings = &$settings;

ob_start();

Zeile 733Zeile 876
		'yahoo' => '',
'msn' =>'',
'birthday' => '',

		'yahoo' => '',
'msn' =>'',
'birthday' => '',

 
		'signature' => '',

		'allownotices' => 'yes',
'hideemail' => 'no',
'emailnotify' => 'no',

		'allownotices' => 'yes',
'hideemail' => 'no',
'emailnotify' => 'no',

Zeile 755Zeile 899
		'tpp' => 0,
'ppp' => 0,
'referrer' => 0,

		'tpp' => 0,
'ppp' => 0,
'referrer' => 0,

 
		'buddylist' => '',
'ignorelist' => '',
'pmfolders' => '',
'notepad' => '',
'showredirect' => 'yes'

	);
$db->insert_query(TABLE_PREFIX.'users', $newuser);
$uid = $db->insert_id();

	);
$db->insert_query(TABLE_PREFIX.'users', $newuser);
$uid = $db->insert_id();

Zeile 762Zeile 911
	$db->query("INSERT INTO ".TABLE_PREFIX."adminoptions VALUES ('{$uid}','','','1','yes','yes','yes','yes','yes','yes','yes','yes','yes','yes','yes','yes','yes','yes','yes','yes','yes','yes')");

// Automatic Login

	$db->query("INSERT INTO ".TABLE_PREFIX."adminoptions VALUES ('{$uid}','','','1','yes','yes','yes','yes','yes','yes','yes','yes','yes','yes','yes','yes','yes','yes','yes','yes','yes','yes')");

// Automatic Login

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

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

	ob_end_flush();

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

	ob_end_flush();

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

Zeile 782Zeile 931
	add_shutdown('test_shutdown_function');

echo $lang->done_step_cachebuilding;

	add_shutdown('test_shutdown_function');

echo $lang->done_step_cachebuilding;

	require_once MYBB_ROOT.'/inc/class_datacache.php';

	require_once MYBB_ROOT.'inc/class_datacache.php';

	$cache = new datacache;
$cache->updateversion();
$cache->updateattachtypes();

	$cache = new datacache;
$cache->updateversion();
$cache->updateattachtypes();

Zeile 823Zeile 972

function db_connection($config)
{


function db_connection($config)
{

	require_once MYBB_ROOT."/inc/db_{$config['dbtype']}.php";

	require_once MYBB_ROOT."inc/db_{$config['dbtype']}.php";

	$db = new databaseEngine;
// Connect to Database
define('TABLE_PREFIX', $config['table_prefix']);

	$db = new databaseEngine;
// Connect to Database
define('TABLE_PREFIX', $config['table_prefix']);

Zeile 845Zeile 994

function write_settings()
{


function write_settings()
{

	global $db, $cwd;

	global $db;

	$query = $db->query('SELECT * FROM '.TABLE_PREFIX.'settings ORDER BY title ASC');
while($setting = $db->fetch_array($query))
{

	$query = $db->query('SELECT * FROM '.TABLE_PREFIX.'settings ORDER BY title ASC');
while($setting = $db->fetch_array($query))
{

Zeile 855Zeile 1004
	if(!empty($settings))
{
$settings = "<?php\n/*********************************\ \n DO NOT EDIT THIS FILE, PLEASE USE\n THE SETTINGS EDITOR\n\*********************************/\n\n{$settings}\n?>";

	if(!empty($settings))
{
$settings = "<?php\n/*********************************\ \n DO NOT EDIT THIS FILE, PLEASE USE\n THE SETTINGS EDITOR\n\*********************************/\n\n{$settings}\n?>";

		$file = fopen(dirname($cwd)."/inc/settings.php", "w");

		$file = fopen(MYBB_ROOT."inc/settings.php", "w");

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

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