Zeile 52 | Zeile 52 |
---|
} }
|
} }
|
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();
| require_once MYBB_ROOT.'inc/functions_user.php'; require_once MYBB_ROOT.'inc/class_language.php'; $lang = new MyLanguage();
|
Zeile 61 | Zeile 60 |
---|
// Load DB interface require_once MYBB_ROOT."inc/db_base.php";
|
// Load DB interface require_once MYBB_ROOT."inc/db_base.php";
|
| require_once MYBB_ROOT."inc/AbstractPdoDbDriver.php";
|
// Prevent any shut down functions from running $done_shutdown = 1;
| // Prevent any shut down functions from running $done_shutdown = 1;
|
Zeile 121 | Zeile 121 |
---|
'short_title' => 'SQLite', 'structure_file' => 'sqlite_db_tables.php', 'population_file' => 'pgsql_db_inserts.php'
|
'short_title' => 'SQLite', 'structure_file' => 'sqlite_db_tables.php', 'population_file' => 'pgsql_db_inserts.php'
|
| ); }
if (in_array('pgsql', $supported_dbs)) { $dboptions['pgsql_pdo'] = array( 'class' => 'PostgresPdoDbDriver', 'title' => 'PostgreSQL (PDO)', 'short_title' => 'PostgreSQL (PDO)', 'structure_file' => 'pgsql_db_tables.php', 'population_file' => 'pgsql_db_inserts.php' ); }
if (in_array('mysql', $supported_dbs)) { $dboptions['mysql_pdo'] = array( 'class' => 'MysqlPdoDbDriver', 'title' => 'MySQL (PDO)', 'short_title' => 'MySQL (PDO)', 'structure_file' => 'mysql_db_tables.php', 'population_file' => 'mysql_db_inserts.php'
|
); } }
| ); } }
|
Zeile 1118 | Zeile 1138 |
---|
else { $configstatus = $lang->sprintf($lang->req_step_span_pass, $lang->writable);
|
else { $configstatus = $lang->sprintf($lang->req_step_span_pass, $lang->writable);
|
| @fclose($configwritable);
|
}
|
}
|
@fclose($configwritable);
| |
// Check settings file is writable $settingswritable = @fopen(MYBB_ROOT.'inc/settings.php', 'w');
| // Check settings file is writable $settingswritable = @fopen(MYBB_ROOT.'inc/settings.php', 'w');
|
Zeile 1132 | Zeile 1152 |
---|
else { $settingsstatus = $lang->sprintf($lang->req_step_span_pass, $lang->writable);
|
else { $settingsstatus = $lang->sprintf($lang->req_step_span_pass, $lang->writable);
|
| @fclose($settingswritable);
|
}
|
}
|
@fclose($settingswritable);
| |
// Check cache directory is writable $cachewritable = @fopen(MYBB_ROOT.'cache/test.write', 'w');
| // Check cache directory is writable $cachewritable = @fopen(MYBB_ROOT.'cache/test.write', 'w');
|
Zeile 1142 | Zeile 1162 |
---|
$errors[] = $lang->sprintf($lang->req_step_error_box, $lang->req_step_error_cachedir); $cachestatus = $lang->sprintf($lang->req_step_span_fail, $lang->not_writable); $showerror = 1;
|
$errors[] = $lang->sprintf($lang->req_step_error_box, $lang->req_step_error_cachedir); $cachestatus = $lang->sprintf($lang->req_step_span_fail, $lang->not_writable); $showerror = 1;
|
@fclose($cachewritable); } else
| } else
|
{ $cachestatus = $lang->sprintf($lang->req_step_span_pass, $lang->writable); @fclose($cachewritable);
| { $cachestatus = $lang->sprintf($lang->req_step_span_pass, $lang->writable); @fclose($cachewritable);
|
Zeile 1159 | Zeile 1178 |
---|
{ $errors[] = $lang->sprintf($lang->req_step_error_box, $lang->req_step_error_uploaddir); $uploadsstatus = $lang->sprintf($lang->req_step_span_fail, $lang->not_writable);
|
{ $errors[] = $lang->sprintf($lang->req_step_error_box, $lang->req_step_error_uploaddir); $uploadsstatus = $lang->sprintf($lang->req_step_span_fail, $lang->not_writable);
|
$showerror = 1; @fclose($uploadswritable); } else
| $showerror = 1; } else
|
{ $uploadsstatus = $lang->sprintf($lang->req_step_span_pass, $lang->writable); @fclose($uploadswritable);
| { $uploadsstatus = $lang->sprintf($lang->req_step_span_pass, $lang->writable); @fclose($uploadswritable);
|
Zeile 1178 | Zeile 1196 |
---|
$errors[] = $lang->sprintf($lang->req_step_error_box, $lang->req_step_error_avatardir); $avatarsstatus = $lang->sprintf($lang->req_step_span_fail, $lang->not_writable); $showerror = 1;
|
$errors[] = $lang->sprintf($lang->req_step_error_box, $lang->req_step_error_avatardir); $avatarsstatus = $lang->sprintf($lang->req_step_span_fail, $lang->not_writable); $showerror = 1;
|
@fclose($avatarswritable); } else {
| } else {
|
$avatarsstatus = $lang->sprintf($lang->req_step_span_pass, $lang->writable); @fclose($avatarswritable); @my_chmod(MYBB_ROOT.'uploads/avatars', '0777'); @my_chmod(MYBB_ROOT.'uploads/avatars/test.write', '0777'); @unlink(MYBB_ROOT.'uploads/avatars/test.write'); }
|
$avatarsstatus = $lang->sprintf($lang->req_step_span_pass, $lang->writable); @fclose($avatarswritable); @my_chmod(MYBB_ROOT.'uploads/avatars', '0777'); @my_chmod(MYBB_ROOT.'uploads/avatars/test.write', '0777'); @unlink(MYBB_ROOT.'uploads/avatars/test.write'); }
|
|
|
// Output requirements page echo $lang->sprintf($lang->req_step_reqtable, $phpversion, $dbsupportlist, $mbstatus, $xmlstatus, $configstatus, $settingsstatus, $cachestatus, $uploadsstatus, $avatarsstatus);
| // Output requirements page echo $lang->sprintf($lang->req_step_reqtable, $phpversion, $dbsupportlist, $mbstatus, $xmlstatus, $configstatus, $settingsstatus, $cachestatus, $uploadsstatus, $avatarsstatus);
|
Zeile 1199 | Zeile 1216 |
---|
echo "\n <input type=\"hidden\" name=\"action\" value=\"{$mybb->input['action']}\" />"; echo "\n <div id=\"next_button\"><input type=\"submit\" class=\"submit_button\" value=\"{$lang->recheck} »\" /></div><br style=\"clear: both;\" />\n"; $output->print_footer();
|
echo "\n <input type=\"hidden\" name=\"action\" value=\"{$mybb->input['action']}\" />"; echo "\n <div id=\"next_button\"><input type=\"submit\" class=\"submit_button\" value=\"{$lang->recheck} »\" /></div><br style=\"clear: both;\" />\n"; $output->print_footer();
|
}
| }
|
else { echo $lang->req_step_reqcomplete;
| else { echo $lang->req_step_reqcomplete;
|
Zeile 1290 | Zeile 1307 |
---|
if(empty($mybb->input['config'][$dbfile]['dbuser'])) { $mybb->input['config'][$dbfile]['dbuser'] = '';
|
if(empty($mybb->input['config'][$dbfile]['dbuser'])) { $mybb->input['config'][$dbfile]['dbuser'] = '';
|
}
| }
|
if(empty($mybb->input['config'][$dbfile]['dbpass'])) { $mybb->input['config'][$dbfile]['dbpass'] = '';
| if(empty($mybb->input['config'][$dbfile]['dbpass'])) { $mybb->input['config'][$dbfile]['dbpass'] = '';
|
Zeile 1399 | Zeile 1416 |
---|
if(!file_exists(MYBB_ROOT."inc/db_{$mybb->input['dbengine']}.php")) { $errors[] = $lang->db_step_error_invalidengine;
|
if(!file_exists(MYBB_ROOT."inc/db_{$mybb->input['dbengine']}.php")) { $errors[] = $lang->db_step_error_invalidengine;
|
database_info(); }
| database_info(); }
|
$mybb->input['config'] = $mybb->get_input('config', MyBB::INPUT_ARRAY); $config = $mybb->input['config'][$mybb->input['dbengine']];
|
$mybb->input['config'] = $mybb->get_input('config', MyBB::INPUT_ARRAY); $config = $mybb->input['config'][$mybb->input['dbengine']];
|
|
|
if(strstr($mybb->input['dbengine'], "sqlite") !== false) { if(strstr($config['dbname'], "./") !== false || strstr($config['dbname'], "../") !== false || empty($config['dbname']))
| if(strstr($mybb->input['dbengine'], "sqlite") !== false) { if(strstr($config['dbname'], "./") !== false || strstr($config['dbname'], "../") !== false || empty($config['dbname']))
|
Zeile 1412 | Zeile 1429 |
---|
$errors[] = $lang->db_step_error_sqlite_invalid_dbname; database_info(); }
|
$errors[] = $lang->db_step_error_sqlite_invalid_dbname; database_info(); }
|
}
| }
|
// Attempt to connect to the db require_once MYBB_ROOT."inc/db_{$mybb->input['dbengine']}.php";
| // Attempt to connect to the db require_once MYBB_ROOT."inc/db_{$mybb->input['dbengine']}.php";
|
Zeile 1423 | Zeile 1440 |
---|
break; case "pgsql": $db = new DB_PgSQL;
|
break; case "pgsql": $db = new DB_PgSQL;
|
break;
| break; case "pgsql_pdo": $db = new PostgresPdoDbDriver(); break;
|
case "mysqli": $db = new DB_MySQLi;
|
case "mysqli": $db = new DB_MySQLi;
|
| break; case "mysql_pdo": $db = new MysqlPdoDbDriver();
|
break; default: $db = new DB_MySQL; } $db->error_reporting = 0;
|
break; default: $db = new DB_MySQL; } $db->error_reporting = 0;
|
| if(!isset($config['encoding'])) { $config['encoding'] = null; }
|
$connect_array = array( "hostname" => $config['dbhost'],
| $connect_array = array( "hostname" => $config['dbhost'],
|
Zeile 1464 | Zeile 1492 |
---|
$errors[] = $lang->db_step_error_tableprefix_too_long; }
|
$errors[] = $lang->db_step_error_tableprefix_too_long; }
|
if(($db->engine == 'mysql' || $db->engine == 'mysqli') && $config['encoding'] == 'utf8mb4' && version_compare($db->get_version(), '5.5.3', '<'))
| if($connection !== false && ($db->engine == 'mysql' || $db->engine == 'mysqli') && $config['encoding'] == 'utf8mb4' && version_compare($db->get_version(), '5.5.3', '<'))
|
{ $errors[] = $lang->db_step_error_utf8mb4_error; }
| { $errors[] = $lang->db_step_error_utf8mb4_error; }
|
Zeile 1472 | Zeile 1500 |
---|
if(is_array($errors)) { database_info();
|
if(is_array($errors)) { database_info();
|
}
| }
|
// 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'] = '".addcslashes($config['encoding'], "'")."';"; } else
| $db_encoding = "\$config['database']['encoding'] = '".addcslashes($config['encoding'], "'")."';"; } else
|
Zeile 1508 | Zeile 1536 |
---|
* rename your Admin CP directory. You then need * to adjust the value below to point to the * new directory.
|
* 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';
|
/** * Hide all Admin CP links
| /** * Hide all Admin CP links
|
Zeile 1518 | Zeile 1546 |
---|
* on the front end of the board after * renaming your Admin CP directory, set this * to 1.
|
* on the front end of the board after * renaming your Admin CP directory, set this * to 1.
|
*/
\$config['hide_admin_links'] = 0;
/**
| */
\$config['hide_admin_links'] = 0;
/**
|
* Data-cache configuration * 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.
|
* Data-cache configuration * 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'. */
\$config['cache_store'] = 'db';
| * * If you wish to use the file system (cache/ directory), MemCache (or MemCached), xcache, APC, APCu, eAccelerator or Redis * you can change the value below to 'files', 'memcache', 'memcached', 'xcache', 'apc', 'apcu', 'eaccelerator' or 'redis' from 'db'. */
\$config['cache_store'] = 'db';
|
/** * Memcache configuration
| /** * Memcache configuration
|
Zeile 1545 | Zeile 1573 |
---|
\$config['memcache']['host'] = 'localhost'; \$config['memcache']['port'] = 11211;
|
\$config['memcache']['host'] = 'localhost'; \$config['memcache']['port'] = 11211;
|
| /** * Redis configuration * If you are using Redis as your data-cache * you need to configure the hostname and port * of your redis server below. If you want * to connect via unix sockets, use the full * path to the unix socket as host and leave * the port setting unconfigured or false. */
\$config['redis']['host'] = 'localhost'; \$config['redis']['port'] = 6379;
|
/** * Super Administrators
| /** * Super Administrators
|
Zeile 1582 | Zeile 1623 |
---|
'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.
| * Disallowed Remote Hosts * List of hosts the fetch_remote_file() function will not * perform requests to.
|
Zeile 1647 | Zeile 1688 |
---|
$val = preg_replace('#mybb_(\S+?)([\s\.,\(]|$)#', $config['tableprefix'].'\\1\\2', $val); $val = preg_replace('#;$#', $db->build_create_table_collation().";", $val); preg_match('#CREATE TABLE (\S+)(\s?|\(?)\(#i', $val, $match);
|
$val = preg_replace('#mybb_(\S+?)([\s\.,\(]|$)#', $config['tableprefix'].'\\1\\2', $val); $val = preg_replace('#;$#', $db->build_create_table_collation().";", $val); preg_match('#CREATE TABLE (\S+)(\s?|\(?)\(#i', $val, $match);
|
if($match[1])
| if(!empty($match[1]))
|
{ $db->drop_table($match[1], false, false); echo $lang->sprintf($lang->tablecreate_step_created, $match[1]); } $db->query($val);
|
{ $db->drop_table($match[1], false, false); echo $lang->sprintf($lang->tablecreate_step_created, $match[1]); } $db->query($val);
|
if($match[1])
| if(!empty($match[1]))
|
{ echo $lang->done . "<br />\n"; }
| { echo $lang->done . "<br />\n"; }
|
Zeile 1767 | Zeile 1808 |
---|
// 1.8: Stylesheet Colors $contents = @file_get_contents(INSTALL_ROOT.'resources/mybb_theme_colors.xml');
|
// 1.8: Stylesheet Colors $contents = @file_get_contents(INSTALL_ROOT.'resources/mybb_theme_colors.xml');
|
require_once MYBB_ROOT."inc/class_xml.php"; $parser = new XMLParser($contents);
| $parser = create_xml_parser($contents);
|
$tree = $parser->get_tree();
if(is_array($tree) && is_array($tree['colors']))
| $tree = $parser->get_tree();
if(is_array($tree) && is_array($tree['colors']))
|
Zeile 1879 | Zeile 1919 |
---|
$cookiedomain = htmlspecialchars_uni($mybb->get_input('cookiedomain')); $cookiepath = htmlspecialchars_uni($mybb->get_input('cookiepath')); $contactemail = htmlspecialchars_uni($mybb->get_input('contactemail'));
|
$cookiedomain = htmlspecialchars_uni($mybb->get_input('cookiedomain')); $cookiepath = htmlspecialchars_uni($mybb->get_input('cookiepath')); $contactemail = htmlspecialchars_uni($mybb->get_input('contactemail'));
|
} else
| } else
|
{ $bbname = 'Forums'; $cookiedomain = '';
| { $bbname = 'Forums'; $cookiedomain = '';
|
Zeile 1888 | Zeile 1928 |
---|
$protocol = "http://"; if((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != "off"))
|
$protocol = "http://"; if((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != "off"))
|
{
| {
|
$protocol = "https://"; }
| $protocol = "https://"; }
|
Zeile 1917 | Zeile 1957 |
---|
else { $cookiedomain = ".{$cookiedomain}";
|
else { $cookiedomain = ".{$cookiedomain}";
|
}
if(!empty($_SERVER['SERVER_PORT'])) {
| }
if(!empty($_SERVER['SERVER_PORT'])) {
|
$port = ":{$_SERVER['SERVER_PORT']}"; $pos = strrpos($cookiedomain, $port);
if($pos !== false) { $cookiedomain = substr($cookiedomain, 0, $pos);
|
$port = ":{$_SERVER['SERVER_PORT']}"; $pos = strrpos($cookiedomain, $port);
if($pos !== false) { $cookiedomain = substr($cookiedomain, 0, $pos);
|
}
| }
|
if($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443 && !preg_match("#:[0-9]#i", $hostname)) { $hostname .= $port;
| if($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443 && !preg_match("#:[0-9]#i", $hostname)) { $hostname .= $port;
|
Zeile 1945 | Zeile 1985 |
---|
if(isset($_SERVER['SERVER_ADMIN']) && filter_var($_SERVER['SERVER_ADMIN'], FILTER_VALIDATE_EMAIL)) { $contactemail = $_SERVER['SERVER_ADMIN'];
|
if(isset($_SERVER['SERVER_ADMIN']) && filter_var($_SERVER['SERVER_ADMIN'], FILTER_VALIDATE_EMAIL)) { $contactemail = $_SERVER['SERVER_ADMIN'];
|
| } else { $contactemail = null;
|
} }
| } }
|
Zeile 2014 | Zeile 2058 |
---|
$adminuser = $adminemail = '';
$settings = file_get_contents(INSTALL_ROOT.'resources/settings.xml');
|
$adminuser = $adminemail = '';
$settings = file_get_contents(INSTALL_ROOT.'resources/settings.xml');
|
$parser = new XMLParser($settings);
| $parser = create_xml_parser($settings);
|
$parser->collapse_dups = 0; $tree = $parser->get_tree(); $groupcount = $settingcount = 0;
| $parser->collapse_dups = 0; $tree = $parser->get_tree(); $groupcount = $settingcount = 0;
|
Zeile 2085 | Zeile 2129 |
---|
include_once MYBB_ROOT."inc/functions_task.php"; $tasks = file_get_contents(INSTALL_ROOT.'resources/tasks.xml');
|
include_once MYBB_ROOT."inc/functions_task.php"; $tasks = file_get_contents(INSTALL_ROOT.'resources/tasks.xml');
|
$parser = new XMLParser($tasks);
| $parser = create_xml_parser($tasks);
|
$parser->collapse_dups = 0; $tree = $parser->get_tree(); $taskcount = 0;
| $parser->collapse_dups = 0; $tree = $parser->get_tree(); $taskcount = 0;
|
Zeile 2123 | Zeile 2167 |
---|
echo $lang->sprintf($lang->admin_step_insertedtasks, $taskcount);
$views = file_get_contents(INSTALL_ROOT.'resources/adminviews.xml');
|
echo $lang->sprintf($lang->admin_step_insertedtasks, $taskcount);
$views = file_get_contents(INSTALL_ROOT.'resources/adminviews.xml');
|
$parser = new XMLParser($views);
| $parser = create_xml_parser($views);
|
$parser->collapse_dups = 0; $tree = $parser->get_tree(); $view_count = 0;
| $parser->collapse_dups = 0; $tree = $parser->get_tree(); $view_count = 0;
|
Zeile 2227 | Zeile 2271 |
---|
// Insert all of our user groups from the XML file $usergroup_settings = file_get_contents(INSTALL_ROOT.'resources/usergroups.xml');
|
// Insert all of our user groups from the XML file $usergroup_settings = file_get_contents(INSTALL_ROOT.'resources/usergroups.xml');
|
$parser = new XMLParser($usergroup_settings);
| $parser = create_xml_parser($usergroup_settings);
|
$parser->collapse_dups = 0; $tree = $parser->get_tree();
| $parser->collapse_dups = 0; $tree = $parser->get_tree();
|
Zeile 2313 | Zeile 2357 |
---|
'referrer' => 0, 'buddylist' => '', 'ignorelist' => '',
|
'referrer' => 0, 'buddylist' => '', 'ignorelist' => '',
|
'pmfolders' => '',
| 'pmfolders' => "0**$%%$1**$%%$2**$%%$3**$%%$4**",
|
'notepad' => '', 'showredirect' => 1, 'usernotes' => ''
| 'notepad' => '', 'showredirect' => 1, 'usernotes' => ''
|
Zeile 2323 | Zeile 2367 |
---|
echo $lang->done_step_adminoptions; $adminoptions = file_get_contents(INSTALL_ROOT.'resources/adminoptions.xml');
|
echo $lang->done_step_adminoptions; $adminoptions = file_get_contents(INSTALL_ROOT.'resources/adminoptions.xml');
|
$parser = new XMLParser($adminoptions);
| $parser = create_xml_parser($adminoptions);
|
$parser->collapse_dups = 0; $tree = $parser->get_tree(); $insertmodule = array();
| $parser->collapse_dups = 0; $tree = $parser->get_tree(); $insertmodule = array();
|
Zeile 2400 | Zeile 2444 |
---|
$cache->update_posticons(); $cache->update_spiders(); $cache->update_bannedips();
|
$cache->update_posticons(); $cache->update_spiders(); $cache->update_bannedips();
|
$cache->update_banned();
| |
$cache->update_bannedemails(); $cache->update_birthdays(); $cache->update_groupleaders(); $cache->update_threadprefixes(); $cache->update_forumsdisplay(); $cache->update("plugins", array());
|
$cache->update_bannedemails(); $cache->update_birthdays(); $cache->update_groupleaders(); $cache->update_threadprefixes(); $cache->update_forumsdisplay(); $cache->update("plugins", array());
|
| $cache->update("mostonline", array( 'numusers' => 0, 'time' => 0, ));
|
$cache->update("internal_settings", array('encryption_key' => random_str(32))); $cache->update_default_theme(); $cache->update_reportreasons(true);
| $cache->update("internal_settings", array('encryption_key' => random_str(32))); $cache->update_default_theme(); $cache->update_reportreasons(true);
|
Zeile 2456 | Zeile 2503 |
---|
/** * @param array $config *
|
/** * @param array $config *
|
* @return DB_MySQL|DB_MySQLi|DB_PgSQL|DB_SQLite
| * @return DB_MySQL|DB_MySQLi|DB_PgSQL|DB_SQLite|PostgresPdoDbDriver|MysqlPdoDbDriver
|
*/ function db_connection($config) {
| */ function db_connection($config) {
|
Zeile 2468 | Zeile 2515 |
---|
break; case "pgsql": $db = new DB_PgSQL;
|
break; case "pgsql": $db = new DB_PgSQL;
|
| break; case "pgsql_pdo": $db = new PostgresPdoDbDriver();
|
break; case "mysqli": $db = new DB_MySQLi;
|
break; case "mysqli": $db = new DB_MySQLi;
|
| break; case "mysql_pdo": $db = new MysqlPdoDbDriver();
|
break; default: $db = new DB_MySQL;
| break; default: $db = new DB_MySQL;
|