Zeile 56 | Zeile 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 67 | Zeile 67 |
---|
// Include the necessary constants for installation $grouppermignore = array('gid', 'type', 'title', 'description', 'namestyle', 'usertitle', 'stars', 'starimage', 'image');
|
// Include the necessary constants for installation $grouppermignore = array('gid', 'type', 'title', 'description', 'namestyle', 'usertitle', 'stars', 'starimage', 'image');
|
$groupzerogreater = array('pmquota', 'maxpmrecipients', 'maxreputationsday', 'attachquota', 'maxemails', 'maxwarningsday', 'maxposts', 'edittimelimit', 'canusesigxposts', 'maxreputationsperthread');
| $groupzerogreater = array('pmquota', 'maxpmrecipients', 'maxreputationsday', 'attachquota', 'maxemails', 'maxwarningsday', 'maxposts', 'edittimelimit', 'canusesigxposts', 'maxreputationsperuser', 'maxreputationsperthread', 'emailfloodtime');
|
$displaygroupfields = array('title', 'description', 'namestyle', 'usertitle', 'stars', 'starimage', 'image'); $fpermfields = array('canview', 'canviewthreads', 'candlattachments', 'canpostthreads', 'canpostreplys', 'canpostattachments', 'canratethreads', 'caneditposts', 'candeleteposts', 'candeletethreads', 'caneditattachments', 'canpostpolls', 'canvotepolls', 'cansearch', 'modposts', 'modthreads', 'modattachments', 'mod_edit_posts');
| $displaygroupfields = array('title', 'description', 'namestyle', 'usertitle', 'stars', 'starimage', 'image'); $fpermfields = array('canview', 'canviewthreads', 'candlattachments', 'canpostthreads', 'canpostreplys', 'canpostattachments', 'canratethreads', 'caneditposts', 'candeleteposts', 'candeletethreads', 'caneditattachments', 'canpostpolls', 'canvotepolls', 'cansearch', 'modposts', 'modthreads', 'modattachments', 'mod_edit_posts');
|
Zeile 193 | Zeile 193 |
---|
{ global $output, $mybb, $lang;
|
{ global $output, $mybb, $lang;
|
$output->print_header($lang->welcome, 'welcome');
| $output->print_header();
|
if(strpos(strtolower(get_current_location('', '', true)), '/upload/') !== false) { echo $lang->sprintf($lang->mybb_incorrect_folder);
| if(strpos(strtolower(get_current_location('', '', true)), '/upload/') !== false) { echo $lang->sprintf($lang->mybb_incorrect_folder);
|
Zeile 1443 | Zeile 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 1477 | Zeile 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
|
/**
| /**
|
* Database configuration * * Please see the MyBB Docs for advanced * database configuration for larger installations
|
* Database configuration * * Please see the MyBB Docs for advanced * database configuration for larger installations
|
* http://docs.mybb.com/ */
\$config['database']['type'] = '{$mybb->input['dbengine']}'; \$config['database']['database'] = '{$config['dbname']}'; \$config['database']['table_prefix'] = '{$config['tableprefix']}';
\$config['database']['hostname'] = '{$config['dbhost']}'; \$config['database']['username'] = '{$config['dbuser']}'; \$config['database']['password'] = '{$config['dbpass']}';
/**
| * https://docs.mybb.com/ */
\$config['database']['type'] = '".addcslashes($mybb->input['dbengine'], "'")."'; \$config['database']['database'] = '".addcslashes($config['dbname'], "'")."'; \$config['database']['table_prefix'] = '".addcslashes($config['tableprefix'], "'")."';
\$config['database']['hostname'] = '".addcslashes($config['dbhost'], "'")."'; \$config['database']['username'] = '".addcslashes($config['dbuser'], "'")."'; \$config['database']['password'] = '".addcslashes($config['dbpass'], "'")."';
/**
|
* Admin CP directory * For security reasons, it is recommended you * rename your Admin CP directory. You then need
| * Admin CP directory * For security reasons, it is recommended you * rename your Admin CP directory. You then need
|
Zeile 1529 | Zeile 1527 |
---|
* The data cache is a temporary cache * of the most commonly accessed data in MyBB. * By default, the database is used to store this data.
|
* The data cache is a temporary cache * of the most commonly accessed data in MyBB. * By default, the database is used to store this data.
|
*
| *
|
* If you wish to use the file system (cache/ directory), MemCache (or MemCached), xcache, APC, or eAccelerator * you can change the value below to 'files', 'memcache', 'memcached', 'xcache', 'apc' or 'eaccelerator' from 'db'. */
| * If you wish to use the file system (cache/ directory), MemCache (or MemCached), xcache, APC, or eAccelerator * you can change the value below to 'files', 'memcache', 'memcached', 'xcache', 'apc' or 'eaccelerator' from 'db'. */
|
Zeile 1564 | Zeile 1562 |
---|
* 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
|
* 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}
| */
{$db_encoding}
|
/** * Automatic Log Pruning
| /** * Automatic Log Pruning
|
Zeile 1584 | Zeile 1582 |
---|
'mail_logs' => 180, // Mail error logs 'user_mail_logs' => 180, // User mail logs 'promotion_logs' => 180 // Promotion logs
|
'mail_logs' => 180, // Mail error logs 'user_mail_logs' => 180, // User mail logs 'promotion_logs' => 180 // Promotion logs
|
| );
/** * Disallowed Remote Hosts * List of hosts the fetch_remote_file() function will not * perform requests to. * It is recommended that you enter hosts resolving to the * forum server here to prevent Server Side Request * Forgery attacks. */
\$config['disallowed_remote_hosts'] = array( 'localhost', );
/** * Disallowed Remote Addresses * List of IPv4 addresses the fetch_remote_file() function * will not perform requests to. * It is recommended that you enter addresses resolving to * the forum server here to prevent Server Side Request * Forgery attacks. * Removing all values disables resolving hosts in that * function. */
\$config['disallowed_remote_addresses'] = array( '127.0.0.1', '10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16',
|
);
";
|
);
";
|
|
|
$file = fopen(MYBB_ROOT.'inc/config.php', 'w'); fwrite($file, $configdata); fclose($file);
|
$file = fopen(MYBB_ROOT.'inc/config.php', 'w'); fwrite($file, $configdata); fclose($file);
|
| if(function_exists('opcache_invalidate')) { opcache_invalidate(MYBB_ROOT."inc/config.php"); }
|
// Error reporting back on $db->error_reporting = 1;
| // Error reporting back on $db->error_reporting = 1;
|
Zeile 2248 | Zeile 2282 |
---|
'lastvisit' => $now, 'website' => '', 'icq' => '',
|
'lastvisit' => $now, 'website' => '', 'icq' => '',
|
'aim' => '',
| |
'yahoo' => '', 'skype' =>'', 'google' =>'',
| 'yahoo' => '', 'skype' =>'', 'google' =>'',
|
Zeile 2334 | Zeile 2367 |
---|
// 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 2377 | Zeile 2410 |
---|
$cache->update("plugins", array()); $cache->update("internal_settings", array('encryption_key' => random_str(32))); $cache->update_default_theme();
|
$cache->update("plugins", array()); $cache->update("internal_settings", array('encryption_key' => random_str(32))); $cache->update_default_theme();
|
| $cache->update_reportreasons(true);
|
$version_history = array(); $dh = opendir(INSTALL_ROOT."resources");
| $version_history = array(); $dh = opendir(INSTALL_ROOT."resources");
|