Zeile 58 | Zeile 58 |
---|
$lang = new MyLanguage(); $lang->set_path(MYBB_ROOT.'install/resources'); $lang->load('language');
|
$lang = new MyLanguage(); $lang->set_path(MYBB_ROOT.'install/resources'); $lang->load('language');
|
| // Load DB interface require_once MYBB_ROOT."inc/db_base.php";
|
// Prevent any shut down functions from running $done_shutdown = 1;
|
// Prevent any shut down functions from running $done_shutdown = 1;
|
// Include the necessary contants for installation
| // 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'); $displaygroupfields = array('title', 'description', 'namestyle', 'usertitle', 'stars', 'starimage', 'image');
|
$grouppermignore = array('gid', 'type', 'title', 'description', 'namestyle', 'usertitle', 'stars', 'starimage', 'image'); $groupzerogreater = array('pmquota', 'maxpmrecipients', 'maxreputationsday', 'attachquota', 'maxemails', 'maxwarningsday', 'maxposts', 'edittimelimit', 'canusesigxposts', 'maxreputationsperthread'); $displaygroupfields = array('title', 'description', 'namestyle', 'usertitle', 'stars', 'starimage', 'image');
|
$fpermfields = array('canview', 'candlattachments', 'canpostthreads', 'canpostreplys', 'canpostattachments', 'canratethreads', 'caneditposts', 'candeleteposts', 'candeletethreads', 'caneditattachments', 'canpostpolls', 'canvotepolls', 'cansearch');
| $fpermfields = array('canview', 'canviewthreads', 'candlattachments', 'canpostthreads', 'canpostreplys', 'canpostattachments', 'canratethreads', 'caneditposts', 'candeleteposts', 'candeletethreads', 'caneditattachments', 'canpostpolls', 'canvotepolls', 'cansearch', 'modposts', 'modthreads', 'modattachments', 'mod_edit_posts');
|
// Include the installation resources require_once INSTALL_ROOT.'resources/output.php';
| // Include the installation resources require_once INSTALL_ROOT.'resources/output.php';
|
Zeile 92 | Zeile 95 |
---|
'title' => 'MySQL', 'short_title' => 'MySQL', 'structure_file' => 'mysql_db_tables.php',
|
'title' => 'MySQL', 'short_title' => 'MySQL', 'structure_file' => 'mysql_db_tables.php',
|
'population_file' => 'mysql_db_inserts.php' ); }
| 'population_file' => 'mysql_db_inserts.php' ); }
|
if(function_exists('pg_connect'))
|
if(function_exists('pg_connect'))
|
{
| {
|
$dboptions['pgsql'] = array( 'class' => 'DB_PgSQL', 'title' => 'PostgreSQL',
| $dboptions['pgsql'] = array( 'class' => 'DB_PgSQL', 'title' => 'PostgreSQL',
|
Zeile 111 | Zeile 114 |
---|
{ $supported_dbs = PDO::getAvailableDrivers(); if(in_array('sqlite', $supported_dbs))
|
{ $supported_dbs = PDO::getAvailableDrivers(); if(in_array('sqlite', $supported_dbs))
|
{
| {
|
$dboptions['sqlite'] = array( 'class' => 'DB_SQLite', 'title' => 'SQLite 3',
| $dboptions['sqlite'] = array( 'class' => 'DB_SQLite', 'title' => 'SQLite 3',
|
Zeile 127 | Zeile 130 |
---|
$output->print_error($lang->locked); } else if($installed == true && empty($mybb->input['action']))
|
$output->print_error($lang->locked); } else if($installed == true && empty($mybb->input['action']))
|
{
| {
|
$output->print_header($lang->already_installed, "errormsg", 0); echo $lang->sprintf($lang->mybb_already_installed, $mybb->version); $output->print_footer();
| $output->print_header($lang->already_installed, "errormsg", 0); echo $lang->sprintf($lang->mybb_already_installed, $mybb->version); $output->print_footer();
|
Zeile 183 | Zeile 186 |
---|
} }
|
} }
|
| /** * Welcome page */
|
function intro() { global $output, $mybb, $lang;
$output->print_header($lang->welcome, 'welcome');
|
function intro() { global $output, $mybb, $lang;
$output->print_header($lang->welcome, 'welcome');
|
if(strpos(strtolower($_SERVER['PHP_SELF']), "upload/") !== false)
| if(strpos(strtolower(get_current_location('', '', true)), '/upload/') !== false)
|
{ echo $lang->sprintf($lang->mybb_incorrect_folder); }
| { echo $lang->sprintf($lang->mybb_incorrect_folder); }
|
Zeile 196 | Zeile 202 |
---|
$output->print_footer('license'); }
|
$output->print_footer('license'); }
|
| /** * Show the license agreement */
|
function license_agreement() { global $output, $lang, $mybb;
| function license_agreement() { global $output, $lang, $mybb;
|
Zeile 203 | Zeile 212 |
---|
ob_start(); $output->print_header($lang->license_agreement, 'license');
|
ob_start(); $output->print_header($lang->license_agreement, 'license');
|
if($mybb->get_input('allow_anonymous_info', 1) == 1)
| if($mybb->get_input('allow_anonymous_info', MyBB::INPUT_INT) == 1)
|
{ require_once MYBB_ROOT."inc/functions_serverstats.php"; $build_server_stats = build_server_stats(1, '', $mybb->version_code);
| { require_once MYBB_ROOT."inc/functions_serverstats.php"; $build_server_stats = build_server_stats(1, '', $mybb->version_code);
|
Zeile 1010 | Zeile 1019 |
---|
$output->print_footer('requirements_check'); }
|
$output->print_footer('requirements_check'); }
|
| /** * Check our requirements */
|
function requirements_check() { global $output, $mybb, $dboptions, $lang;
| function requirements_check() { global $output, $mybb, $dboptions, $lang;
|
Zeile 1195 | Zeile 1207 |
---|
} }
|
} }
|
| /** * Which database do we use? */
|
function database_info() { global $output, $dbinfo, $errors, $mybb, $dboptions, $lang;
$mybb->input['action'] = 'database_info'; $output->print_header($lang->db_config, 'dbconfig');
|
function database_info() { global $output, $dbinfo, $errors, $mybb, $dboptions, $lang;
$mybb->input['action'] = 'database_info'; $output->print_header($lang->db_config, 'dbconfig');
|
|
|
echo "<script type=\"text/javascript\"> function updateDBSettings()
|
echo "<script type=\"text/javascript\"> function updateDBSettings()
|
{
| {
|
var dbengine = \$(\"#dbengine\").val(); $('.db_settings').each(function() {
| var dbengine = \$(\"#dbengine\").val(); $('.db_settings').each(function() {
|
Zeile 1213 | Zeile 1228 |
---|
if(dbengine+'_settings' == element.attr('id')) { element.show();
|
if(dbengine+'_settings' == element.attr('id')) { element.show();
|
}
| }
|
else { element.hide();
| else { element.hide();
|
Zeile 1227 | Zeile 1242 |
---|
</script>";
// Check for errors from this stage
|
</script>";
// Check for errors from this stage
|
if(is_array($errors)) {
| if(is_array($errors)) {
|
$error_list = error_list($errors); echo $lang->sprintf($lang->db_step_error_config, $error_list);
|
$error_list = error_list($errors); echo $lang->sprintf($lang->db_step_error_config, $error_list);
|
}
| }
|
else
|
else
|
{
| {
|
echo $lang->db_step_config_db; }
| echo $lang->db_step_config_db; }
|
Zeile 1245 | Zeile 1260 |
---|
if($mybb->get_input('dbengine') == $dbfile) { $dbengines .= "<option value=\"{$dbfile}\" selected=\"selected\">{$dbtype['title']}</option>";
|
if($mybb->get_input('dbengine') == $dbfile) { $dbengines .= "<option value=\"{$dbfile}\" selected=\"selected\">{$dbtype['title']}</option>";
|
} else
| } else
|
{ $dbengines .= "<option value=\"{$dbfile}\">{$dbtype['title']}</option>";
|
{ $dbengines .= "<option value=\"{$dbfile}\">{$dbtype['title']}</option>";
|
}
| }
|
}
$db_info = array();
| }
$db_info = array();
|
Zeile 1259 | Zeile 1274 |
---|
$db = new $dbtype['class']; $encodings = $db->fetch_db_charsets(); $encoding_select = '';
|
$db = new $dbtype['class']; $encodings = $db->fetch_db_charsets(); $encoding_select = '';
|
$mybb->input['config'] = $mybb->get_input('config', 2);
| $mybb->input['config'] = $mybb->get_input('config', MyBB::INPUT_ARRAY);
|
if(empty($mybb->input['config'][$dbfile]['dbhost'])) { $mybb->input['config'][$dbfile]['dbhost'] = "localhost"; } if(empty($mybb->input['config'][$dbfile]['tableprefix']))
|
if(empty($mybb->input['config'][$dbfile]['dbhost'])) { $mybb->input['config'][$dbfile]['dbhost'] = "localhost"; } if(empty($mybb->input['config'][$dbfile]['tableprefix']))
|
{
| {
|
$mybb->input['config'][$dbfile]['tableprefix'] = "mybb_"; } if(empty($mybb->input['config'][$dbfile]['dbname']))
| $mybb->input['config'][$dbfile]['tableprefix'] = "mybb_"; } if(empty($mybb->input['config'][$dbfile]['dbname']))
|
Zeile 1277 | Zeile 1292 |
---|
$mybb->input['config'][$dbfile]['dbuser'] = ''; } if(empty($mybb->input['config'][$dbfile]['dbpass']))
|
$mybb->input['config'][$dbfile]['dbuser'] = ''; } if(empty($mybb->input['config'][$dbfile]['dbpass']))
|
{
| {
|
$mybb->input['config'][$dbfile]['dbpass'] = ''; } if(empty($mybb->input['config'][$dbfile]['encoding'])) { $mybb->input['config'][$dbfile]['encoding'] = "utf8";
|
$mybb->input['config'][$dbfile]['dbpass'] = ''; } if(empty($mybb->input['config'][$dbfile]['encoding'])) { $mybb->input['config'][$dbfile]['encoding'] = "utf8";
|
}
| }
|
$class = ''; if(empty($first) && !$mybb->get_input('dbengine'))
|
$class = ''; if(empty($first) && !$mybb->get_input('dbengine'))
|
{
| {
|
$mybb->input['dbengine'] = $dbfile; $first = true; }
| $mybb->input['dbengine'] = $dbfile; $first = true; }
|
Zeile 1295 | Zeile 1310 |
---|
{ $class = "_selected"; }
|
{ $class = "_selected"; }
|
|
|
$db_info[$dbfile] = " <tbody id=\"{$dbfile}_settings\" class=\"db_settings db_type{$class}\"> <tr> <th colspan=\"2\" class=\"first last\">{$dbtype['title']} {$lang->database_settings}</th>
|
$db_info[$dbfile] = " <tbody id=\"{$dbfile}_settings\" class=\"db_settings db_type{$class}\"> <tr> <th colspan=\"2\" class=\"first last\">{$dbtype['title']} {$lang->database_settings}</th>
|
</tr>";
| </tr>";
|
// SQLite gets some special settings if($dbfile == 'sqlite') {
| // SQLite gets some special settings if($dbfile == 'sqlite') {
|
Zeile 1337 | Zeile 1352 |
---|
$db_info[$dbfile] .= " <tr> <th colspan=\"2\" class=\"first last\">{$dbtype['title']} {$lang->table_settings}</th>
|
$db_info[$dbfile] .= " <tr> <th colspan=\"2\" class=\"first last\">{$dbtype['title']} {$lang->table_settings}</th>
|
</tr>
| </tr>
|
<tr class=\"first\"> <td class=\"first\"><label for=\"config_{$dbfile}_tableprefix\">{$lang->table_prefix}</label></td> <td class=\"last alt_col\"><input type=\"text\" class=\"text_input\" name=\"config[{$dbfile}][tableprefix]\" id=\"config_{$dbfile}_tableprefix\" value=\"".htmlspecialchars_uni($mybb->input['config'][$dbfile]['tableprefix'])."\" /></td>
| <tr class=\"first\"> <td class=\"first\"><label for=\"config_{$dbfile}_tableprefix\">{$lang->table_prefix}</label></td> <td class=\"last alt_col\"><input type=\"text\" class=\"text_input\" name=\"config[{$dbfile}][tableprefix]\" id=\"config_{$dbfile}_tableprefix\" value=\"".htmlspecialchars_uni($mybb->input['config'][$dbfile]['tableprefix'])."\" /></td>
|
Zeile 1373 | Zeile 1388 |
---|
$output->print_footer('create_tables'); }
|
$output->print_footer('create_tables'); }
|
| /** * Create our tables */
|
function create_tables() { global $output, $dbinfo, $errors, $mybb, $dboptions, $lang;
| function create_tables() { global $output, $dbinfo, $errors, $mybb, $dboptions, $lang;
|
Zeile 1384 | Zeile 1402 |
---|
database_info(); }
|
database_info(); }
|
$mybb->input['config'] = $mybb->get_input('config', 2);
| $mybb->input['config'] = $mybb->get_input('config', MyBB::INPUT_ARRAY);
|
$config = $mybb->input['config'][$mybb->input['dbengine']];
if(strstr($mybb->input['dbengine'], "sqlite") !== false)
| $config = $mybb->input['config'][$mybb->input['dbengine']];
if(strstr($mybb->input['dbengine'], "sqlite") !== false)
|
Zeile 1610 | Zeile 1628 |
---|
$output->print_footer('populate_tables'); }
|
$output->print_footer('populate_tables'); }
|
| /** * Insert our default data */
|
function populate_tables() { global $output, $lang;
|
function populate_tables() { global $output, $lang;
|
|
|
require MYBB_ROOT.'inc/config.php'; $db = db_connection($config);
|
require MYBB_ROOT.'inc/config.php'; $db = db_connection($config);
|
|
|
$output->print_header($lang->table_population, 'tablepopulate'); echo $lang->sprintf($lang->populate_step_insert);
|
$output->print_header($lang->table_population, 'tablepopulate'); echo $lang->sprintf($lang->populate_step_insert);
|
|
|
if(!empty($dboptions[$db->type]['population_file'])) { $population_file = $dboptions[$db->type]['population_file'];
| if(!empty($dboptions[$db->type]['population_file'])) { $population_file = $dboptions[$db->type]['population_file'];
|
Zeile 1634 | Zeile 1655 |
---|
{ $val = preg_replace('#mybb_(\S+?)([\s\.,]|$)#', $config['database']['table_prefix'].'\\1\\2', $val); $db->query($val);
|
{ $val = preg_replace('#mybb_(\S+?)([\s\.,]|$)#', $config['database']['table_prefix'].'\\1\\2', $val); $db->query($val);
|
}
| }
|
// Update the sequences for PgSQL if($config['database']['type'] == "pgsql") {
| // Update the sequences for PgSQL if($config['database']['type'] == "pgsql") {
|
Zeile 1654 | Zeile 1675 |
---|
$output->print_footer('templates'); }
|
$output->print_footer('templates'); }
|
| /** * Install our theme */
|
function insert_templates() { global $mybb, $output, $cache, $db, $lang;
require MYBB_ROOT.'inc/config.php'; $db = db_connection($config);
|
function insert_templates() { global $mybb, $output, $cache, $db, $lang;
require MYBB_ROOT.'inc/config.php'; $db = db_connection($config);
|
|
|
require_once MYBB_ROOT.'inc/class_datacache.php'; $cache = new datacache;
| require_once MYBB_ROOT.'inc/class_datacache.php'; $cache = new datacache;
|
Zeile 1758 | Zeile 1782 |
---|
} }
|
} }
|
$db->update_query("themes", array("def" => 1, "properties" => $db->escape_string(serialize($properties)), "stylesheets" => $db->escape_string(serialize($stylesheets))), "tid = '{$tid}'");
| $db->update_query("themes", array("def" => 1, "properties" => $db->escape_string(my_serialize($properties)), "stylesheets" => $db->escape_string(my_serialize($stylesheets))), "tid = '{$tid}'");
|
echo $lang->theme_step_imported; $output->print_footer('configuration'); }
|
echo $lang->theme_step_imported; $output->print_footer('configuration'); }
|
| /** * Default configuration */
|
function configure() { global $output, $mybb, $errors, $lang;
$output->print_header($lang->board_config, 'config');
|
function configure() { global $output, $mybb, $errors, $lang;
$output->print_header($lang->board_config, 'config');
|
|
|
echo <<<EOF
|
echo <<<EOF
|
<script type="text/javascript">
| <script type="text/javascript">
|
function warnUser(inp, warn) { var parenttr = $('#'+inp.id).closest('tr');
| function warnUser(inp, warn) { var parenttr = $('#'+inp.id).closest('tr');
|
Zeile 1790 | Zeile 1817 |
---|
} } }
|
} } }
|
|
|
function revertSetting(defval, inpid) {
|
function revertSetting(defval, inpid) {
|
$(inpid).val(defval);
| $(inpid).val(defval);
|
var parenttr = $(inpid).closest('tr'); parenttr.next('.setting_peeker').remove(); if(parenttr.is(':last-child')) { parenttr.addClass('last');
|
var parenttr = $(inpid).closest('tr'); parenttr.next('.setting_peeker').remove(); if(parenttr.is(':last-child')) { parenttr.addClass('last');
|
}
| }
|
} </script>
|
} </script>
|
|
|
EOF;
// If board configuration errors
| EOF;
// If board configuration errors
|
Zeile 1818 | Zeile 1845 |
---|
$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 = '';
|
$cookiepath = '/';
| |
$websitename = 'Your Website';
|
$websitename = 'Your Website';
|
$contactemail = '';
| |
$protocol = "http://"; if((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != "off")) { $protocol = "https://";
|
$protocol = "http://"; if((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != "off")) { $protocol = "https://";
|
}
| }
|
// Attempt auto-detection
|
// Attempt auto-detection
|
if($_SERVER['HTTP_HOST'])
| if(!empty($_SERVER['HTTP_HOST']))
|
{ $hostname = $protocol.$_SERVER['HTTP_HOST']; $cookiedomain = $_SERVER['HTTP_HOST']; }
|
{ $hostname = $protocol.$_SERVER['HTTP_HOST']; $cookiedomain = $_SERVER['HTTP_HOST']; }
|
elseif($_SERVER['SERVER_NAME'])
| elseif(!empty($_SERVER['SERVER_NAME']))
|
{ $hostname = $protocol.$_SERVER['SERVER_NAME']; $cookiedomain = $_SERVER['SERVER_NAME'];
|
{ $hostname = $protocol.$_SERVER['SERVER_NAME']; $cookiedomain = $_SERVER['SERVER_NAME'];
|
}
if(substr($cookiedomain, 0, 4) == "www.") { $cookiedomain = my_substr($cookiedomain, 4); }
| }
if(my_substr($cookiedomain, 0, 4) == "www.") { $cookiedomain = substr($cookiedomain, 4); }
|
// IP addresses and hostnames are not valid if(my_inet_pton($cookiedomain) !== false || strpos($cookiedomain, '.') === false)
| // IP addresses and hostnames are not valid if(my_inet_pton($cookiedomain) !== false || strpos($cookiedomain, '.') === false)
|
Zeile 1860 | Zeile 1885 |
---|
$cookiedomain = ".{$cookiedomain}"; }
|
$cookiedomain = ".{$cookiedomain}"; }
|
if($_SERVER['SERVER_PORT'] && $_SERVER['SERVER_PORT'] != 80 && !preg_match("#:[0-9]#i", $hostname))
| if(!empty($_SERVER['SERVER_PORT']))
|
{
|
{
|
$hostname .= ':'.$_SERVER['SERVER_PORT'];
| $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; }
|
}
|
}
|
| $currentlocation = get_current_location('', '', true); $noinstall = substr($currentlocation, 0, strrpos($currentlocation, '/install/'));
$cookiepath = $noinstall.'/'; $bburl = $hostname.$noinstall;
|
$websiteurl = $hostname.'/';
|
$websiteurl = $hostname.'/';
|
$currentlocation = get_current_location(); if($currentlocation) { // TODO: Change this to find the last position of /install/ $pos = my_strpos($currentlocation, '/install/'); if($pos === 0) { $cookiepath = "/"; } else { $cookiepath = my_substr($currentlocation, 0, $pos).'/'; } }
$currentscript = $hostname.get_current_location();
if($currentscript) { $bburl = my_substr($currentscript, 0, my_strpos($currentscript, '/install/')); }
if($_SERVER['SERVER_ADMIN'])
| if(isset($_SERVER['SERVER_ADMIN']) && filter_var($_SERVER['SERVER_ADMIN'], FILTER_VALIDATE_EMAIL))
|
{ $contactemail = $_SERVER['SERVER_ADMIN']; }
| { $contactemail = $_SERVER['SERVER_ADMIN']; }
|
Zeile 1897 | Zeile 1917 |
---|
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'); }
|
| /** * How do we want to name the admin user? */
|
function create_admin_user() { global $output, $mybb, $errors, $db, $lang;
| function create_admin_user() { global $output, $mybb, $errors, $db, $lang;
|
Zeile 1911 | Zeile 1934 |
---|
$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');
|
|
|
echo <<<EOF
|
echo <<<EOF
|
<script type="text/javascript">
| <script type="text/javascript">
|
function comparePass() { var parenttr = $('#adminpass2').closest('tr');
| function comparePass() { var parenttr = $('#adminpass2').closest('tr');
|
Zeile 1938 | Zeile 1961 |
---|
} } </script>
|
} } </script>
|
|
|
EOF;
if(is_array($errors))
| EOF;
if(is_array($errors))
|
Zeile 2020 | Zeile 2043 |
---|
* If you wish to request a PIN * when someone tries to login * on your Admin CP, enter it below.
|
* If you wish to request a PIN * when someone tries to login * on your Admin CP, enter it below.
|
*/
| */
|
\$config['secret_pin'] = '{$pin}';");
| \$config['secret_pin'] = '{$pin}';");
|
Zeile 2108 | Zeile 2131 |
---|
"type" => $db->escape_string($view['attributes']['type']), "visibility" => (int)$view['attributes']['visibility'], "title" => $db->escape_string($view['title'][0]['value']),
|
"type" => $db->escape_string($view['attributes']['type']), "visibility" => (int)$view['attributes']['visibility'], "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)),
| "fields" => $db->escape_string(my_serialize($fields)), "conditions" => $db->escape_string(my_serialize($conditions)), "custom_profile_fields" => $db->escape_string(my_serialize($custom_profile_fields)),
|
"sortby" => $db->escape_string($view['sortby'][0]['value']), "sortorder" => $db->escape_string($view['sortorder'][0]['value']), "perpage" => (int)$view['perpage'][0]['value'],
| "sortby" => $db->escape_string($view['sortby'][0]['value']), "sortorder" => $db->escape_string($view['sortorder'][0]['value']), "perpage" => (int)$view['perpage'][0]['value'],
|
Zeile 2129 | Zeile 2152 |
---|
$output->print_footer('final'); }
|
$output->print_footer('final'); }
|
| /** * Installation is finished */
|
function install_done() { global $output, $db, $mybb, $errors, $cache, $lang;
| function install_done() { global $output, $db, $mybb, $errors, $cache, $lang;
|
Zeile 2234 | Zeile 2260 |
---|
'receivepms' => 1, 'pmnotice' => 1, 'pmnotify' => 1,
|
'receivepms' => 1, 'pmnotice' => 1, 'pmnotify' => 1,
|
| 'buddyrequestspm' => 1, 'buddyrequestsauto' => 0,
|
'showimages' => 1, 'showvideos' => 1, 'showsigs' => 1,
| 'showimages' => 1, 'showvideos' => 1, 'showsigs' => 1,
|
Zeile 2293 | Zeile 2321 |
---|
'uid' => (int)$uid, 'cpstyle' => '', 'notes' => '',
|
'uid' => (int)$uid, 'cpstyle' => '', 'notes' => '',
|
'permissions' => $db->escape_string(serialize($insertmodule)), 'defaultviews' => $db->escape_string(serialize($defaultviews))
| 'permissions' => $db->escape_string(my_serialize($insertmodule)), 'defaultviews' => $db->escape_string(my_serialize($defaultviews))
|
);
$insertmodule = array();
| );
$insertmodule = array();
|
Zeile 2392 | Zeile 2420 |
---|
$output->print_footer(''); }
|
$output->print_footer(''); }
|
| /** * @param array $config * * @return DB_MySQL|DB_MySQLi|DB_PgSQL|DB_SQLite */
|
function db_connection($config) { require_once MYBB_ROOT."inc/db_{$config['database']['type']}.php"; switch($config['database']['type'])
|
function db_connection($config) { require_once MYBB_ROOT."inc/db_{$config['database']['type']}.php"; switch($config['database']['type'])
|
{
| {
|
case "sqlite": $db = new DB_SQLite; break;
| case "sqlite": $db = new DB_SQLite; break;
|
Zeile 2416 | Zeile 2449 |
---|
$db->connect($config['database']); $db->set_table_prefix(TABLE_PREFIX); $db->type = $config['database']['type'];
|
$db->connect($config['database']); $db->set_table_prefix(TABLE_PREFIX); $db->type = $config['database']['type'];
|
|
|
return $db; }
|
return $db; }
|
| /** * @param array $array * * @return string */
|
function error_list($array) { $string = "<ul>\n";
| function error_list($array) { $string = "<ul>\n";
|
Zeile 2431 | Zeile 2469 |
---|
return $string; }
|
return $string; }
|
| /** * Write our settings to the settings file */
|
function write_settings() { global $db;
| function write_settings() { global $db;
|
Zeile 2450 | Zeile 2491 |
---|
fclose($file); } }
|
fclose($file); } }
|
?>
| |