diff --git a/phpBB/admin/admin_board.php b/phpBB/admin/admin_board.php
index 4d98e63dad..11eed1fb2b 100644
--- a/phpBB/admin/admin_board.php
+++ b/phpBB/admin/admin_board.php
@@ -36,114 +36,60 @@ if(!$result = $db->sql_query($sql))
}
else
{
-/*
while($row = $db->sql_fetchrow($result))
{
- $board_config[$row['config_var_name']] = stripslashes($row['config_var_value']);
+ $config_name = $row['config_name'];
+ $config_value = $row['config_value'];
+ $default_config[$config_name] = $config_value;
+
+ $new[$config_name] = (isset($HTTP_POST_VARS[$config_name])) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name];
+
+ if($HTTP_POST_VARS['submit'])
+ {
+ $sql = "UPDATE " . CONFIG_TABLE . " SET
+ config_value = '".$new[$config_name]."'
+ WHERE config_name = '$config_name'";
+ if( !$db->sql_query($sql) )
+ {
+ message_die(GENERAL_ERROR, "Failed to update general configuration for $config_name", "", __LINE__, __FILE__, $sql);
+ }
+ }
}
-*/
-
- $default_config = $db->sql_fetchrow($result);
-}
-
-$sitename = (isset($HTTP_POST_VARS['sitename'])) ? $HTTP_POST_VARS['sitename'] : $default_config['sitename'];
-$require_activation = (isset($HTTP_POST_VARS['require_activation'])) ? $HTTP_POST_VARS['require_activation'] : $default_config['require_activation'];
-$flood_interval = (isset($HTTP_POST_VARS['flood_interval'])) ? $HTTP_POST_VARS['flood_interval'] : $default_config['flood_interval'];
-$topics_per_page = (isset($HTTP_POST_VARS['topics_per_page'])) ? $HTTP_POST_VARS['topics_per_page'] : $default_config['topics_per_page'];
-$posts_per_page = (isset($HTTP_POST_VARS['posts_per_page'])) ? $HTTP_POST_VARS['posts_per_page'] : $default_config['posts_per_page'];
-$hot_topic = (isset($HTTP_POST_VARS['hot_topic'])) ? $HTTP_POST_VARS['hot_topic'] : $default_config['hot_threshold'];
-$selected_template = (isset($HTTP_POST_VARS['template'])) ? $HTTP_POST_VARS['template'] : $default_config['sys_template'];
-$template_select = template_select($selected_template, "../templates");
-$theme = (isset($HTTP_POST_VARS['theme'])) ? $HTTP_POST_VARS['theme'] : $default_config['default_theme'];
-$theme_select = theme_select($theme);
-$language = (isset($HTTP_POST_VARS['language'])) ? $HTTP_POST_VARS['language'] : $default_config['default_lang'];
-$lang_select = language_select($language, "../language");
-$timezone = (isset($HTTP_POST_VARS['timezone'])) ? intval($HTTP_POST_VARS['timezone']) : $default_config['system_timezone'];
-$timezone_select = tz_select($timezone);
-$date_format = (isset($HTTP_POST_VARS['date_format'])) ? $HTTP_POST_VARS['date_format'] : $default_config['default_dateformat'];
-$gzip = (isset($HTTP_POST_VARS['gzip'])) ? $HTTP_POST_VARS['gzip'] : $default_config['gzip_compress'];
-$prune = (isset($HTTP_POST_VARS['prune'])) ? $HTTP_POST_VARS['prune'] : $default_config['prune_enable'];
-$allow_html = (isset($HTTP_POST_VARS['allow_html'])) ? $HTTP_POST_VARS['allow_html'] : $default_config['allow_html'];
-$allow_bbcode = (isset($HTTP_POST_VARS['allow_bbcode'])) ? $HTTP_POST_VARS['allow_bbcode'] : $default_config['allow_bbcode'];
-$allow_smile = (isset($HTTP_POST_VARS['allow_smile'])) ? $HTTP_POST_VARS['allow_smile'] : $default_config['allow_smilies'];
-$allow_sig = (isset($HTTP_POST_VARS['allow_sig'])) ? $HTTP_POST_VARS['allow_sig'] : $default_config['allow_sig'];
-$allow_namechange = (isset($HTTP_POST_VARS['allow_namechange'])) ? $HTTP_POST_VARS['allow_namechange'] : $default_config['allow_namechange'];
-$allow_avatars_local = (isset($HTTP_POST_VARS['allow_avatars_local'])) ? $HTTP_POST_VARS['allow_avatars_local'] : $default_config['allow_avatar_local'];
-$allow_avatars_remote = (isset($HTTP_POST_VARS['allow_avatars_remote'])) ? $HTTP_POST_VARS['allow_avatars_remote'] : $default_config['allow_avatar_remote'];
-$allow_avatars_upload = (isset($HTTP_POST_VARS['allow_avatars_upload'])) ? $HTTP_POST_VARS['allow_avatars_upload'] : $default_config['allow_avatar_upload'];
-$avatar_filesize = (isset($HTTP_POST_VARS['avatar_filesize'])) ? $HTTP_POST_VARS['avatar_filesize'] : $default_config['avatar_filesize'];
-$avatar_height = (isset($HTTP_POST_VARS['avatar_height'])) ? $HTTP_POST_VARS['avatar_height'] : $default_config['avatar_max_height'];
-$avatar_width = (isset($HTTP_POST_VARS['avatar_width'])) ? $HTTP_POST_VARS['avatar_width'] : $default_config['avatar_max_width'];
-$avatar_path = (isset($HTTP_POST_VARS['avatar_path'])) ? $HTTP_POST_VARS['avatar_path'] : $default_config['avatar_path'];
-$admin_email = (isset($HTTP_POST_VARS['admin_email'])) ? $HTTP_POST_VARS['admin_email'] : $default_config['board_email_from'];
-$email_sig = (isset($HTTP_POST_VARS['email_sig'])) ? $HTTP_POST_VARS['email_sig'] : $default_config['board_email'];
-$use_smtp = (isset($HTTP_POST_VARS['use_smtp'])) ? $HTTP_POST_VARS['use_smtp'] : $default_config['smtp_delivery'];
-$smtp_server = (isset($HTTP_POST_VARS['smtp_server'])) ? $HTTP_POST_VARS['smtp_server'] : $default_config['smtp_host'];
-
-$html_yes = ($allow_html) ? "checked=\"checked\"" : "";
-$html_no = (!$allow_html) ? "checked=\"checked\"" : "";
-$bbcode_yes = ($allow_bbcode) ? "checked=\"checked\"" : "";
-$bbcode_no = (!$allow_bbcode) ? "checked=\"checked\"" : "";
-$activation_yes = ($require_activation) ? "checked=\"checked\"" : "";
-$activation_no = (!$require_activation) ? "checked=\"checked\"" : "";
-$gzip_yes = ($gzip) ? "checked=\"checked\"" : "";
-$gzip_no = (!$gzip) ? "checked=\"checked\"" : "";
-$smile_yes = ($allow_smile) ? "checked=\"checked\"" : "";
-$smile_no = (!$allow_smile) ? "checked=\"checked\"" : "";
-$sig_yes = ($allow_sig) ? "checked=\"checked\"" : "";
-$sig_no = (!$allow_sig) ? "checked=\"checked\"" : "";
-$namechange_yes = ($allow_namechange) ? "checked=\"checked\"" : "";
-$namechange_no = (!$allow_namechange) ? "checked=\"checked\"" : "";
-$avatars_local_yes = ($allow_avatars_local) ? "checked=\"checked\"" : "";
-$avatars_local_no = (!$allow_avatars_local) ? "checked=\"checked\"" : "";
-$avatars_remote_yes = ($allow_avatars_remote) ? "checked=\"checked\"" : "";
-$avatars_remote_no = (!$allow_avatars_remote) ? "checked=\"checked\"" : "";
-$avatars_upload_yes = ($allow_avatars_upload) ? "checked=\"checked\"" : "";
-$avatars_upload_no = (!$allow_avatars_upload) ? "checked=\"checked\"" : "";
-$smtp_yes = ($use_smtp) ? "checked=\"checked\"" : "";
-$smtp_no = (!$use_smtp) ? "checked=\"checked\"" : "";
-
-if($HTTP_POST_VARS['submit'])
-{
- $sql = "UPDATE " . CONFIG_TABLE . " SET
- sitename = '$sitename',
- allow_html = $allow_html,
- allow_bbcode = $allow_bbcode,
- allow_smilies = $allow_smile,
- allow_sig = $allow_sig,
- allow_namechange = $allow_namechange,
- allow_avatar_local = $allow_avatars_local,
- allow_avatar_remote = $allow_avatars_remote,
- allow_avatar_upload = $allow_avatars_upload,
- posts_per_page = $posts_per_page,
- topics_per_page = $topics_per_page,
- hot_threshold = $hot_topic,
- email_sig = '$email_sig',
- email_from = '$admin_email',
- smtp_delivery = $use_smtp,
- smtp_host = '$smtp_server',
- require_activation = $require_activation,
- flood_interval = $flood_interval,
- avatar_filesize = $avatar_filesize,
- avatar_max_width = $avatar_width,
- avatar_max_height = $avatar_height,
- avatar_path = '$avatar_path',
- default_theme = $theme,
- default_lang = '$language',
- default_dateformat = '$date_format',
- system_timezone = $timezone,
- sys_template = '$selected_template',
- gzip_compress = $gzip,
- prune_enable = $prune";
-
- if( !$db->sql_query($sql) )
+ if($HTTP_POST_VARS['submit'])
{
- message_die(GENERAL_ERROR, "Failed to update general configuration", "", __LINE__, __FILE__, $sql);
+ message_die(GENERAL_MESSAGE, $lang['Config_updated']);
}
-
- message_die(GENERAL_MESSAGE, $lang['Config_updated']);
}
+$template_select = template_select($new['board_template'], 'board_template', "../templates");
+$theme_select = theme_select($new['default_theme'], 'default_theme');
+$lang_select = language_select($new['default_lang'], 'default_lang', "../language");
+$timezone_select = tz_select($new['board_timezone'], 'board_timezone');
+
+$html_yes = ($new['allow_html']) ? "checked=\"checked\"" : "";
+$html_no = (!$new['allow_html']) ? "checked=\"checked\"" : "";
+$bbcode_yes = ($new['allow_bbcode']) ? "checked=\"checked\"" : "";
+$bbcode_no = (!$new['allow_bbcode']) ? "checked=\"checked\"" : "";
+$activation_yes = ($new['require_activation']) ? "checked=\"checked\"" : "";
+$activation_no = (!$new['require_activation']) ? "checked=\"checked\"" : "";
+$gzip_yes = ($new['gzip_compress']) ? "checked=\"checked\"" : "";
+$gzip_no = (!$new['gzip_compress']) ? "checked=\"checked\"" : "";
+$smile_yes = ($new['allow_smilies']) ? "checked=\"checked\"" : "";
+$smile_no = (!$new['allow_smilies']) ? "checked=\"checked\"" : "";
+$sig_yes = ($new['allow_sig']) ? "checked=\"checked\"" : "";
+$sig_no = (!$new['allow_sig']) ? "checked=\"checked\"" : "";
+$namechange_yes = ($new['allow_namechange']) ? "checked=\"checked\"" : "";
+$namechange_no = (!$new['allow_namechange']) ? "checked=\"checked\"" : "";
+$avatars_local_yes = ($new['allow_avatar_local']) ? "checked=\"checked\"" : "";
+$avatars_local_no = (!$new['allow_avatar_local']) ? "checked=\"checked\"" : "";
+$avatars_remote_yes = ($new['allow_avatar_remote']) ? "checked=\"checked\"" : "";
+$avatars_remote_no = (!$new['allow_avatar_remote']) ? "checked=\"checked\"" : "";
+$avatars_upload_yes = ($new['allow_avatar_upload']) ? "checked=\"checked\"" : "";
+$avatars_upload_no = (!$new['allow_avatar_upload']) ? "checked=\"checked\"" : "";
+$smtp_yes = ($new['smtp_delivery']) ? "checked=\"checked\"" : "";
+$smtp_no = (!$new['smtp_delivery']) ? "checked=\"checked\"" : "";
+
+
$template->set_filenames(array(
"body" => "admin/admin_config_body.tpl")
@@ -151,18 +97,18 @@ $template->set_filenames(array(
$template->assign_vars(array(
"S_CONFIG_ACTION" => append_sid("admin_board.$phpEx"),
- "SITENAME" => $sitename,
+ "SITENAME" => $new['sitename'],
"ACTIVATION_YES" => $activation_yes,
"ACTIVATION_NO" => $activation_no,
- "FLOOD_INTERVAL" => $flood_interval,
- "TOPICS_PER_PAGE" => $topics_per_page,
- "POSTS_PER_PAGE" => $posts_per_page,
- "HOT_TOPIC" => $hot_topic,
+ "FLOOD_INTERVAL" => $new['flood_interval'],
+ "TOPICS_PER_PAGE" => $new['topics_per_page'],
+ "POSTS_PER_PAGE" => $new['posts_per_page'],
+ "HOT_TOPIC" => $new['hot_threshold'],
"TEMPLATE_SELECT" => $template_select,
"THEME_SELECT" => $theme_select,
"LANG_SELECT" => $lang_select,
"L_DATE_FORMAT_EXPLAIN" => $lang['Date_format_explain'],
- "DATE_FORMAT" => $date_format,
+ "DEFAULT_DATEFORMAT" => $new['default_dateformat'],
"TIMEZONE_SELECT" => $timezone_select,
"GZIP_YES" => $gzip_yes,
"GZIP_NO" => $gzip_no,
@@ -182,19 +128,19 @@ $template->assign_vars(array(
"AVATARS_REMOTE_NO" => $avatars_remote_no,
"AVATARS_UPLOAD_YES" => $avatars_upload_yes,
"AVATARS_UPLOAD_NO" => $avatars_upload_no,
- "AVATAR_FILESIZE" => $avatar_filesize,
- "AVATAR_HEIGHT" => $avatar_height,
- "AVATAR_WIDTH" => $avatar_width,
- "AVATAR_PATH" => $avatar_path,
- "ADMIN_EMAIL" => $admin_email,
- "EMAIL_SIG" => $email_sig,
+ "AVATAR_FILESIZE" => $new['avatar_filesize'],
+ "AVATAR_MAX_HEIGHT" => $new['avatar_max_height'],
+ "AVATAR_MAX_WIDTH" => $new['avatar_max_width'],
+ "AVATAR_PATH" => $new['avatar_path'],
+ "EMAIL_FROM" => $new['email_from'],
+ "EMAIL_SIG" => $new['email_sig'],
"SMTP_YES" => $smtp_yes,
"SMTP_NO" => $smtp_no,
- "SMTP_SERVER" => $smtp_server)
+ "SMTP_HOST" => $new['smtp_host'])
);
$template->pparse("body");
include('page_footer_admin.'.$phpEx);
-?>
\ No newline at end of file
+?>
diff --git a/phpBB/admin/admin_mass_email.php b/phpBB/admin/admin_mass_email.php
index b2f34f8ed3..9d62cdc169 100644
--- a/phpBB/admin/admin_mass_email.php
+++ b/phpBB/admin/admin_mass_email.php
@@ -90,7 +90,7 @@ if(isset($HTTP_POST_VARS['submit']))
}
$g_list = $db->sql_fetchrowset($g_result);
- $email_headers = "From: " . $board_config['board_email_from'] . "\r\n";
+ $email_headers = "From: " . $board_config['board_email'] . "\r\n";
$msg = stripslashes($HTTP_POST_VARS["$f_msg"]);
$email_headers .= 'bcc: ';
@@ -102,7 +102,7 @@ if(isset($HTTP_POST_VARS['submit']))
}
$email_headers .= $g_list[$i]['user_email'];
}
- mail($board_config['board_email_from'],$HTTP_POST_VARS["$f_title"],$HTTP_POST_VARS["$f_msg"],$email_headers);
+ mail($board_config['board_email'],$HTTP_POST_VARS["$f_title"],$HTTP_POST_VARS["$f_msg"],$email_headers);
$notice = $lang['Messages'].' '.$lang['Sent'].'!';
}
//Else, or if they already sent a message
diff --git a/phpBB/admin/admin_users.php b/phpBB/admin/admin_users.php
index 103783dcd6..d476dc802d 100644
--- a/phpBB/admin/admin_users.php
+++ b/phpBB/admin/admin_users.php
@@ -109,7 +109,7 @@ if ( isset($HTTP_GET_VARS['submit']) ) {
if(!isset($user_template))
{
- $selected_template = $board_config['default_template'];
+ $selected_template = $board_config['board_template'];
}
$html_status = ($board_config['allow_html']) ? $lang['ON'] : $lang['OFF'];
@@ -276,8 +276,8 @@ else if($HTTP_POST_VARS[submit] && $HTTP_POST_VARS['user_id'])
$user_theme = ($HTTP_POST_VARS['theme']) ? $HTTP_POST_VARS['theme'] : $board_config['default_theme'];
$user_lang = ($HTTP_POST_VARS['language']) ? $HTTP_POST_VARS['language'] : $board_config['default_lang'];
- $user_timezone = (isset($HTTP_POST_VARS['timezone'])) ? $HTTP_POST_VARS['timezone'] : $board_config['default_timezone'];
- $user_template = ($HTTP_POST_VARS['template']) ? $HTTP_POST_VARS['template'] : $board_config['default_template'];
+ $user_timezone = (isset($HTTP_POST_VARS['timezone'])) ? $HTTP_POST_VARS['timezone'] : $board_config['board_timezone'];
+ $user_template = ($HTTP_POST_VARS['template']) ? $HTTP_POST_VARS['template'] : $board_config['board_template'];
$user_dateformat = ($HTTP_POST_VARS['dateformat']) ? trim($HTTP_POST_VARS['dateformat']) : $board_config['default_dateformat'];
$user_status = (!empty($HTTP_POST_VARS['user_status'])) ? $HTTP_POST_VARS['user_status'] : 0;
diff --git a/phpBB/admin/index.php b/phpBB/admin/index.php
index c7d6ae0dea..8436fee577 100644
--- a/phpBB/admin/index.php
+++ b/phpBB/admin/index.php
@@ -141,7 +141,7 @@ elseif( $HTTP_GET_VARS['pane'] == 'right' )
$total_users = get_db_stat('usercount');
$total_topics = get_db_stat('topiccount');
- $start_date = create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['default_timezone']);
+ $start_date = create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['board_timezone']);
$boarddays = (time() - $board_config['board_startdate']) / (24*60*60);
@@ -397,7 +397,7 @@ elseif( $HTTP_GET_VARS['pane'] == 'right' )
"ROW_CLASS" => $row_class,
"USERNAME" => $username,
"LOGGED_ON" => $logged_on,
- "LASTUPDATE" => create_date($board_config['default_dateformat'], $onlinerow[$i]['session_time'], $board_config['default_timezone']),
+ "LASTUPDATE" => create_date($board_config['default_dateformat'], $onlinerow[$i]['session_time'], $board_config['board_timezone']),
"LOCATION" => $location,
"IP_ADDRESS" => $ip_address,
"U_USER_PROFILE" => append_sid("admin_users.$phpEx?" . POST_USERS_URL . "=" . $onlinerow[$i]['user_id']))
diff --git a/phpBB/admin/page_header_admin.php b/phpBB/admin/page_header_admin.php
index 8ef73f17f2..c17e9d61d9 100644
--- a/phpBB/admin/page_header_admin.php
+++ b/phpBB/admin/page_header_admin.php
@@ -60,17 +60,17 @@ $template->set_filenames(array(
//
// Do timezone text output
//
-if($board_config['default_timezone'] < 0)
+if($board_config['board_timezone'] < 0)
{
- $s_timezone = $lang['All_times'] . " " .$lang['GMT'] . " - " . (-$board_config['default_timezone']) . " " . $lang['Hours'];
+ $s_timezone = $lang['All_times'] . " " .$lang['GMT'] . " - " . (-$board_config['board_timezone']) . " " . $lang['Hours'];
}
-else if($board_config['default_timezone'] == 0)
+else if($board_config['board_timezone'] == 0)
{
$s_timezone = $lang['All_times'] . " " . $lang['GMT'];
}
else
{
- $s_timezone = $lang['All_times'] . " " . $lang['GMT'] ." + " . $board_config['default_timezone'] . " " . $lang['Hours'];
+ $s_timezone = $lang['All_times'] . " " . $lang['GMT'] ." + " . $board_config['board_timezone'] . " " . $lang['Hours'];
}
//
@@ -113,7 +113,7 @@ $template->assign_vars(array(
"S_TIMEZONE" => $s_timezone,
"S_LOGIN_ACTION" => append_sid("../login.$phpEx"),
"S_JUMPBOX_ACTION" => append_sid("../viewforum.$phpEx"),
- "S_CURRENT_TIME" => create_date($board_config['default_dateformat'], time(), $board_config['default_timezone']),
+ "S_CURRENT_TIME" => create_date($board_config['default_dateformat'], time(), $board_config['board_timezone']),
"T_HEAD_STYLESHEET" => $theme['head_stylesheet'],
"T_BODY_BACKGROUND" => $theme['body_background'],
diff --git a/phpBB/common.php b/phpBB/common.php
index aa250de253..8e585b57e2 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -141,13 +141,16 @@ if(!$result = $db->sql_query($sql))
}
else
{
-/*
while($row = $db->sql_fetchrow($result))
{
- $board_config[$row['config_var_name']] = stripslashes($row['config_var_value']);
+ $board_config[$row['config_name']] = $row['config_value'];
}
-*/
-
+ $board_config['allow_html_tags'] = split(",", $board_config['allow_html_tags']);
+ $board_config['board_email'] = str_replace("
", "\n", $board_config['email_sig']);
+ $board_config['default_template'] = stripslashes($board_config['sys_template']);
+ $board_config['board_timezone'] = $board_config['system_timezone'];
+
+/*
$config = $db->sql_fetchrow($result);
$board_config['board_disable'] = $config['board_disable'];
@@ -171,7 +174,7 @@ else
$board_config['default_theme'] = $config['default_theme'];
$board_config['default_dateformat'] = stripslashes($config['default_dateformat']);
$board_config['default_template'] = stripslashes($config['sys_template']);
- $board_config['default_timezone'] = $config['system_timezone'];
+ $board_config['board_timezone'] = $config['system_timezone'];
$board_config['default_lang'] = stripslashes($config['default_lang']);
$board_config['board_email'] = stripslashes(str_replace("
", "\n", $config['email_sig']));
$board_config['board_email_from'] = stripslashes($config['email_from']);
@@ -191,6 +194,7 @@ else
$board_config['gzip_compress'] = $config['gzip_compress'];
$board_config['smtp_delivery'] = $config['smtp_delivery'];
$board_config['smtp_host'] = stripslashes($config['smtp_host']);
+*/
}
if($board_config['board_disable'] && !defined("IN_ADMIN"))
@@ -205,4 +209,4 @@ if($board_config['board_disable'] && !defined("IN_ADMIN"))
//
$emailer = new emailer($board_config['smtp_delivery']);
-?>
\ No newline at end of file
+?>
diff --git a/phpBB/config.php b/phpBB/config.php
index b8cee67675..b0dc738f7f 100644
--- a/phpBB/config.php
+++ b/phpBB/config.php
@@ -26,16 +26,14 @@
// and fill in the required details
//
-/*
//
// MySQL
//
$dbms = "mysql";
-$dbhost = "";
-$dbname = "";
-$dbuser = "";
-$dbpasswd = "";
-*/
+$dbhost = "localhost";
+$dbname = "bartvb";
+$dbuser = "bartvb";
+$dbpasswd = "bvbdb=";
/*
//
@@ -97,4 +95,4 @@ $dbpasswd = "";
//
$table_prefix = "phpbb_";
-?>
\ No newline at end of file
+?>
diff --git a/phpBB/db/mssql_basic.sql b/phpBB/db/mssql_basic.sql
index 1a16a50704..41f95fe10c 100644
--- a/phpBB/db/mssql_basic.sql
+++ b/phpBB/db/mssql_basic.sql
@@ -11,7 +11,48 @@ BEGIN TRANSACTION;
/*
-- Config
*/
-INSERT INTO phpbb_config (config_id, board_disable, board_startdate, sitename, cookie_name, cookie_path, cookie_domain, cookie_secure, session_length, allow_html, allow_html_tags, allow_bbcode, allow_smilies, allow_sig, allow_namechange, allow_theme_create, allow_avatar_local, allow_avatar_remote, allow_avatar_upload, override_themes, posts_per_page, topics_per_page, hot_threshold, email_sig, email_from, smtp_delivery, smtp_host, require_activation, flood_interval, max_poll_options, avatar_filesize, avatar_max_width, avatar_max_height, avatar_path, smilies_path, default_theme, default_lang, default_dateformat, system_timezone, sys_template, prune_enable, gzip_compress) VALUES (1, '', '', 'yourdomain.com', 'phpbb2mssql', '/', '', '', 600, '', 'b, u, i, pre, font color', 1, 1, 1, '', '', '', '', '', '', 10, 25, 10, '', '', '', '', '', 10, 10, 6144, 70, 70, 'images/avatars', 'images/smiles', 2, 'english', 'd M Y H:i', '', 'PSO', 1, '');
+INSERT INTO phpbb_config VALUES ('config_id','1');
+INSERT INTO phpbb_config VALUES ('board_disable','0');
+INSERT INTO phpbb_config VALUES ('board_startdate','994190324');
+INSERT INTO phpbb_config VALUES ('sitename','yourdomain.com');
+INSERT INTO phpbb_config VALUES ('cookie_name','phpbb2mysql');
+INSERT INTO phpbb_config VALUES ('cookie_path','/');
+INSERT INTO phpbb_config VALUES ('cookie_domain','');
+INSERT INTO phpbb_config VALUES ('cookie_secure','0');
+INSERT INTO phpbb_config VALUES ('session_length','900');
+INSERT INTO phpbb_config VALUES ('allow_html','0');
+INSERT INTO phpbb_config VALUES ('allow_html_tags','b,i,u,pre');
+INSERT INTO phpbb_config VALUES ('allow_bbcode','1');
+INSERT INTO phpbb_config VALUES ('allow_smilies','1');
+INSERT INTO phpbb_config VALUES ('allow_sig','1');
+INSERT INTO phpbb_config VALUES ('allow_namechange','0');
+INSERT INTO phpbb_config VALUES ('allow_theme_create','0');
+INSERT INTO phpbb_config VALUES ('allow_avatar_local','0');
+INSERT INTO phpbb_config VALUES ('allow_avatar_remote','1');
+INSERT INTO phpbb_config VALUES ('allow_avatar_upload','1');
+INSERT INTO phpbb_config VALUES ('override_themes','0');
+INSERT INTO phpbb_config VALUES ('posts_per_page','15');
+INSERT INTO phpbb_config VALUES ('topics_per_page','50');
+INSERT INTO phpbb_config VALUES ('hot_threshold','25');
+INSERT INTO phpbb_config VALUES ('max_poll_options','10');
+INSERT INTO phpbb_config VALUES ('email_sig','Thanks, The Management');
+INSERT INTO phpbb_config VALUES ('email_from','youraddress@yourdomain.com');
+INSERT INTO phpbb_config VALUES ('smtp_delivery','0');
+INSERT INTO phpbb_config VALUES ('smtp_host','');
+INSERT INTO phpbb_config VALUES ('require_activation','0');
+INSERT INTO phpbb_config VALUES ('flood_interval','15');
+INSERT INTO phpbb_config VALUES ('avatar_filesize','6144');
+INSERT INTO phpbb_config VALUES ('avatar_max_width','80');
+INSERT INTO phpbb_config VALUES ('avatar_max_height','80');
+INSERT INTO phpbb_config VALUES ('avatar_path','images/avatars');
+INSERT INTO phpbb_config VALUES ('smilies_path','images/smiles');
+INSERT INTO phpbb_config VALUES ('default_theme','2');
+INSERT INTO phpbb_config VALUES ('default_lang','english');
+INSERT INTO phpbb_config VALUES ('default_dateformat','D M d, Y g:i a');
+INSERT INTO phpbb_config VALUES ('board_timezone','-8');
+INSERT INTO phpbb_config VALUES ('board_template','PSO');
+INSERT INTO phpbb_config VALUES ('prune_enable','1');
+INSERT INTO phpbb_config VALUES ('gzip_compress','1');
/*
-- Categories
diff --git a/phpBB/db/mssql_schema.sql b/phpBB/db/mssql_schema.sql
index 1b2afc47b4..48a9bbee58 100644
--- a/phpBB/db/mssql_schema.sql
+++ b/phpBB/db/mssql_schema.sql
@@ -168,48 +168,8 @@ CREATE TABLE [phpbb_categories] (
GO
CREATE TABLE [phpbb_config] (
- [config_id] [int] NULL ,
- [board_disable] [smallint] NOT NULL ,
- [board_startdate] [int] NULL ,
- [sitename] [varchar] (100) NOT NULL ,
- [cookie_name] [varchar] (25) NULL ,
- [cookie_path] [varchar] (50) NULL ,
- [cookie_domain] [varchar] (100) NULL ,
- [cookie_secure] [smallint] NULL ,
- [session_length] [int] NULL ,
- [allow_html] [smallint] NULL ,
- [allow_html_tags] [varchar] (255) NULL ,
- [allow_bbcode] [smallint] NULL ,
- [allow_smilies] [smallint] NULL ,
- [allow_sig] [smallint] NULL ,
- [allow_namechange] [smallint] NULL ,
- [allow_theme_create] [smallint] NULL ,
- [allow_avatar_local] [smallint] NULL ,
- [allow_avatar_remote] [smallint] NULL ,
- [allow_avatar_upload] [smallint] NULL ,
- [override_themes] [smallint] NULL ,
- [posts_per_page] [int] NULL ,
- [topics_per_page] [int] NULL ,
- [hot_threshold] [int] NULL ,
- [email_sig] [varchar] (255) NULL ,
- [email_from] [varchar] (255) NULL ,
- [smtp_delivery] [smallint] NULL ,
- [smtp_host] [varchar] (100) NULL ,
- [require_activation] [smallint] NULL ,
- [flood_interval] [int] NULL ,
- [max_poll_options] [int] NULL ,
- [avatar_filesize] [int] NULL ,
- [avatar_max_width] [smallint] NULL ,
- [avatar_max_height] [smallint] NULL ,
- [avatar_path] [varchar] (50) NULL ,
- [smilies_path] [varchar] (50) NULL ,
- [default_theme] [int] NULL ,
- [default_lang] [varchar] (50) NULL ,
- [default_dateformat] [varchar] (15) NULL ,
- [system_timezone] [int] NULL ,
- [sys_template] [varchar] (50) NULL ,
- [prune_enable] [smallint] NULL ,
- [gzip_compress] [smallint] NULL
+ [config_name] [varchar] (255) NULL ,
+ [config_value] [varchar] (255) NULL
) ON [PRIMARY]
GO
diff --git a/phpBB/db/mysql_basic.sql b/phpBB/db/mysql_basic.sql
index 055fedc285..2115727d51 100644
--- a/phpBB/db/mysql_basic.sql
+++ b/phpBB/db/mysql_basic.sql
@@ -4,7 +4,48 @@
# $Id$
# -- Config
-INSERT INTO phpbb_config (config_id, board_disable, sitename, cookie_name, cookie_path, cookie_domain, cookie_secure, session_length, allow_html, allow_html_tags, allow_bbcode, allow_smilies, allow_sig, allow_namechange, allow_theme_create, allow_avatar_local, allow_avatar_remote, allow_avatar_upload, override_themes, posts_per_page, topics_per_page, hot_threshold, max_poll_options, email_sig, email_from, require_activation, flood_interval, avatar_filesize, avatar_max_width, avatar_max_height, avatar_path, smilies_path, default_theme, default_lang, default_dateformat, system_timezone, sys_template, prune_enable, gzip_compress, board_startdate, smtp_delivery, smtp_host) VALUES (1,0,'yourdomain.com','phpbb2mysql','/','','',900,'','b,i,u,pre',1,1,1,'','','',1,1,'',15,50,25,10,'Thanks, The Management','youraddress@yourdomain.com','',15,6144,80,80,'images/avatars','images/smiles',2,'english','D M d, Y g:i a',-8,'PSO',1,1,994190324,'','');
+INSERT INTO phpbb_config VALUES ('config_id','1');
+INSERT INTO phpbb_config VALUES ('board_disable','0');
+INSERT INTO phpbb_config VALUES ('board_startdate','994190324');
+INSERT INTO phpbb_config VALUES ('sitename','yourdomain.com');
+INSERT INTO phpbb_config VALUES ('cookie_name','phpbb2mysql');
+INSERT INTO phpbb_config VALUES ('cookie_path','/');
+INSERT INTO phpbb_config VALUES ('cookie_domain','');
+INSERT INTO phpbb_config VALUES ('cookie_secure','0');
+INSERT INTO phpbb_config VALUES ('session_length','900');
+INSERT INTO phpbb_config VALUES ('allow_html','0');
+INSERT INTO phpbb_config VALUES ('allow_html_tags','b,i,u,pre');
+INSERT INTO phpbb_config VALUES ('allow_bbcode','1');
+INSERT INTO phpbb_config VALUES ('allow_smilies','1');
+INSERT INTO phpbb_config VALUES ('allow_sig','1');
+INSERT INTO phpbb_config VALUES ('allow_namechange','0');
+INSERT INTO phpbb_config VALUES ('allow_theme_create','0');
+INSERT INTO phpbb_config VALUES ('allow_avatar_local','0');
+INSERT INTO phpbb_config VALUES ('allow_avatar_remote','1');
+INSERT INTO phpbb_config VALUES ('allow_avatar_upload','1');
+INSERT INTO phpbb_config VALUES ('override_themes','0');
+INSERT INTO phpbb_config VALUES ('posts_per_page','15');
+INSERT INTO phpbb_config VALUES ('topics_per_page','50');
+INSERT INTO phpbb_config VALUES ('hot_threshold','25');
+INSERT INTO phpbb_config VALUES ('max_poll_options','10');
+INSERT INTO phpbb_config VALUES ('email_sig','Thanks, The Management');
+INSERT INTO phpbb_config VALUES ('email_from','youraddress@yourdomain.com');
+INSERT INTO phpbb_config VALUES ('smtp_delivery','0');
+INSERT INTO phpbb_config VALUES ('smtp_host','');
+INSERT INTO phpbb_config VALUES ('require_activation','0');
+INSERT INTO phpbb_config VALUES ('flood_interval','15');
+INSERT INTO phpbb_config VALUES ('avatar_filesize','6144');
+INSERT INTO phpbb_config VALUES ('avatar_max_width','80');
+INSERT INTO phpbb_config VALUES ('avatar_max_height','80');
+INSERT INTO phpbb_config VALUES ('avatar_path','images/avatars');
+INSERT INTO phpbb_config VALUES ('smilies_path','images/smiles');
+INSERT INTO phpbb_config VALUES ('default_theme','2');
+INSERT INTO phpbb_config VALUES ('default_lang','english');
+INSERT INTO phpbb_config VALUES ('default_dateformat','D M d, Y g:i a');
+INSERT INTO phpbb_config VALUES ('board_timezone','-8');
+INSERT INTO phpbb_config VALUES ('board_template','PSO');
+INSERT INTO phpbb_config VALUES ('prune_enable','1');
+INSERT INTO phpbb_config VALUES ('gzip_compress','1');
# -- Categories
INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test category 1', 1);
diff --git a/phpBB/db/mysql_schema.sql b/phpBB/db/mysql_schema.sql
index 2f91f023f3..8baf9d38d8 100644
--- a/phpBB/db/mysql_schema.sql
+++ b/phpBB/db/mysql_schema.sql
@@ -91,52 +91,11 @@ CREATE TABLE phpbb_categories (
#
DROP TABLE IF EXISTS phpbb_config;
CREATE TABLE phpbb_config (
- config_id int(11) NOT NULL auto_increment,
- board_disable tinyint(1) DEFAULT '0' NOT NULL,
- board_startdate int(11),
- sitename varchar(100),
- cookie_name char(20),
- cookie_path char(25),
- cookie_domain char(50),
- cookie_secure tinyint(1),
- session_length int(11),
- allow_html tinyint(1),
- allow_html_tags char(255) DEFAULT 'b,u,i,pre,font color' NOT NULL,
- allow_bbcode tinyint(1),
- allow_smilies tinyint(1),
- allow_sig tinyint(1),
- allow_namechange tinyint(1),
- allow_theme_create tinyint(1),
- allow_avatar_local tinyint(1) DEFAULT '0' NOT NULL,
- allow_avatar_remote tinyint(1) DEFAULT '0' NOT NULL,
- allow_avatar_upload tinyint(1) DEFAULT '0' NOT NULL,
- override_themes tinyint(3),
- posts_per_page int(11),
- topics_per_page int(11),
- hot_threshold int(11),
- max_poll_options int(11),
- email_sig varchar(255),
- email_from varchar(100),
- smtp_delivery tinyint(1) DEFAULT '0' NOT NULL,
- smtp_host varchar(50),
- require_activation tinyint(1) DEFAULT '0' NOT NULL,
- flood_interval int(4) NOT NULL,
- avatar_filesize int(11) DEFAULT '6144' NOT NULL,
- avatar_max_width smallint(6) DEFAULT '70' NOT NULL,
- avatar_max_height smallint(6) DEFAULT '70' NOT NULL,
- avatar_path varchar(255) DEFAULT 'images/avatars' NOT NULL,
- smilies_path char(100) DEFAULT 'images/smiles' NOT NULL,
- default_theme int(11) DEFAULT '1' NOT NULL,
- default_lang varchar(255),
- default_dateformat varchar(14) DEFAULT 'd M Y H:i' NOT NULL,
- system_timezone int(11) DEFAULT '0' NOT NULL,
- sys_template varchar(100) DEFAULT 'Default' NOT NULL,
- prune_enable tinyint(1) DEFAULT '1' NOT NULL,
- gzip_compress tinyint(1) DEFAULT '0' NOT NULL,
- PRIMARY KEY (config_id)
+ config_name varchar(255) NOT NULL,
+ config_value varchar(255) NOT NULL,
+ PRIMARY KEY (config_name)
);
-
# --------------------------------------------------------
#
# Table structure for table 'phpbb_disallow'
@@ -570,4 +529,4 @@ CREATE TABLE phpbb_words (
word varchar(100) NOT NULL,
replacement varchar(100) NOT NULL,
PRIMARY KEY (word_id)
-);
\ No newline at end of file
+);
diff --git a/phpBB/db/postgres_basic.sql b/phpBB/db/postgres_basic.sql
index 6a403e52fa..849d984259 100755
--- a/phpBB/db/postgres_basic.sql
+++ b/phpBB/db/postgres_basic.sql
@@ -5,7 +5,48 @@
*/
-- Config
-INSERT INTO phpbb_config (config_id, board_disable, sitename, cookie_name, cookie_path, cookie_domain, cookie_secure, session_length, allow_html, allow_bbcode, allow_smilies, allow_sig, allow_namechange, posts_per_page, hot_threshold, topics_per_page, flood_interval, allow_theme_create, override_themes, email_sig, email_from, default_theme, default_lang, default_dateformat, system_timezone, sys_template, avatar_filesize, avatar_path, allow_avatar_upload, avatar_max_width, avatar_max_height, allow_avatar_local, allow_avatar_remote, max_poll_options) VALUES ( '1', '0', 'phpbb.com', 'phpbb2mysql', '/', '', '0', 600, '0', '1', '1', '1', '0', '10', '10', '25', '10', '0', '0', '', '', '2', 'english', 'd M Y H:i', '0', 'PSO', '6144', 'images/avatars', '0', '70', '70', '0', '0', '10');
+INSERT INTO phpbb_config VALUES ('config_id','1');
+INSERT INTO phpbb_config VALUES ('board_disable','0');
+INSERT INTO phpbb_config VALUES ('board_startdate','994190324');
+INSERT INTO phpbb_config VALUES ('sitename','yourdomain.com');
+INSERT INTO phpbb_config VALUES ('cookie_name','phpbb2mysql');
+INSERT INTO phpbb_config VALUES ('cookie_path','/');
+INSERT INTO phpbb_config VALUES ('cookie_domain','');
+INSERT INTO phpbb_config VALUES ('cookie_secure','0');
+INSERT INTO phpbb_config VALUES ('session_length','900');
+INSERT INTO phpbb_config VALUES ('allow_html','0');
+INSERT INTO phpbb_config VALUES ('allow_html_tags','b,i,u,pre');
+INSERT INTO phpbb_config VALUES ('allow_bbcode','1');
+INSERT INTO phpbb_config VALUES ('allow_smilies','1');
+INSERT INTO phpbb_config VALUES ('allow_sig','1');
+INSERT INTO phpbb_config VALUES ('allow_namechange','0');
+INSERT INTO phpbb_config VALUES ('allow_theme_create','0');
+INSERT INTO phpbb_config VALUES ('allow_avatar_local','0');
+INSERT INTO phpbb_config VALUES ('allow_avatar_remote','1');
+INSERT INTO phpbb_config VALUES ('allow_avatar_upload','1');
+INSERT INTO phpbb_config VALUES ('override_themes','0');
+INSERT INTO phpbb_config VALUES ('posts_per_page','15');
+INSERT INTO phpbb_config VALUES ('topics_per_page','50');
+INSERT INTO phpbb_config VALUES ('hot_threshold','25');
+INSERT INTO phpbb_config VALUES ('max_poll_options','10');
+INSERT INTO phpbb_config VALUES ('email_sig','Thanks, The Management');
+INSERT INTO phpbb_config VALUES ('email_from','youraddress@yourdomain.com');
+INSERT INTO phpbb_config VALUES ('smtp_delivery','0');
+INSERT INTO phpbb_config VALUES ('smtp_host','');
+INSERT INTO phpbb_config VALUES ('require_activation','0');
+INSERT INTO phpbb_config VALUES ('flood_interval','15');
+INSERT INTO phpbb_config VALUES ('avatar_filesize','6144');
+INSERT INTO phpbb_config VALUES ('avatar_max_width','80');
+INSERT INTO phpbb_config VALUES ('avatar_max_height','80');
+INSERT INTO phpbb_config VALUES ('avatar_path','images/avatars');
+INSERT INTO phpbb_config VALUES ('smilies_path','images/smiles');
+INSERT INTO phpbb_config VALUES ('default_theme','2');
+INSERT INTO phpbb_config VALUES ('default_lang','english');
+INSERT INTO phpbb_config VALUES ('default_dateformat','D M d, Y g:i a');
+INSERT INTO phpbb_config VALUES ('board_timezone','-8');
+INSERT INTO phpbb_config VALUES ('board_template','PSO');
+INSERT INTO phpbb_config VALUES ('prune_enable','1');
+INSERT INTO phpbb_config VALUES ('gzip_compress','1');
-- Categories
INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test category 1', 1);
diff --git a/phpBB/db/postgres_schema.sql b/phpBB/db/postgres_schema.sql
index 162eab39a1..c4e37ea370 100644
--- a/phpBB/db/postgres_schema.sql
+++ b/phpBB/db/postgres_schema.sql
@@ -87,49 +87,9 @@ CREATE TABLE phpbb_categories (
Table structure for table phpbb_config
-------------------------------------------------------- */
CREATE TABLE phpbb_config (
- config_id int2 NOT NULL,
- board_disable int2 DEFAULT '0' NOT NULL,
- board_startdate int4,
- sitename varchar(100) NOT NULL,
- cookie_name varchar(20),
- cookie_path varchar(25),
- cookie_domain varchar(50),
- cookie_secure int2,
- session_length int4,
- allow_html int2 NOT NULL,
- allow_html_tags char(255) DEFAULT 'b,u,i,pre,font color' NOT NULL,
- allow_bbcode int2 NOT NULL,
- allow_smilies int2 NOT NULL,
- allow_sig int2 NOT NULL,
- allow_namechange int2 NOT NULL,
- allow_theme_create int2 NOT NULL,
- allow_avatar_local int2 DEFAULT '0' NOT NULL,
- allow_avatar_remote int2 DEFAULT '0' NOT NULL,
- allow_avatar_upload int2 DEFAULT '0' NOT NULL,
- posts_per_page int2 NOT NULL,
- topics_per_page int2 NOT NULL,
- hot_threshold int2 NOT NULL,
- max_poll_options int,
- email_sig varchar(255) NOT NULL,
- email_from varchar(100) NOT NULL,
- smtp_delivery int2 DEFAULT '0' NOT NULL,
- smtp_host varchar(50),
- require_activation int2 DEFAULT '0' NOT NULL,
- default_theme int4 NOT NULL,
- default_dateformat varchar(20) NOT NULL,
- default_lang varchar(50) NOT NULL,
- system_timezone int4 NOT NULL,
- sys_template varchar(50) NOT NULL,
- avatar_filesize int4 DEFAULT '6144' NOT NULL,
- avatar_max_width int2 DEFAULT '70' NOT NULL,
- avatar_max_height int2 DEFAULT '70' NOT NULL,
- avatar_path varchar(255) DEFAULT 'images/avatars' NOT NULL,
- smilies_path varchar(50) DEFAULT 'images/smiles' NOT NULL,
- override_themes int2 NOT NULL,
- flood_interval int NOT NULL,
- prune_enable int2 DEFAULT '0' NOT NULL,
- gzip_compress int2 DEFAULT '0' NOT NULL,
- CONSTRAINT phpbb_config_pkey PRIMARY KEY (config_id)
+ config_name varchar(255) NOT NULL,
+ config_value varchar(255) NOT NULL,
+ CONSTRAINT phpbb_config_pkey PRIMARY KEY (config_name)
);
diff --git a/phpBB/develop/convert_conf.php b/phpBB/develop/convert_conf.php
new file mode 100644
index 0000000000..3e7fb0d606
--- /dev/null
+++ b/phpBB/develop/convert_conf.php
@@ -0,0 +1,96 @@
+
+
+$phpbb_root_path = "../";
+
+include($phpbb_root_path . 'extension.inc');
+include($phpbb_root_path . 'config.'.$phpEx);
+include($phpbb_root_path . 'includes/constants.'.$phpEx);
+include($phpbb_root_path . 'includes/db.'.$phpEx);
+
+$sql = "SELECT *
+ FROM " . CONFIG_TABLE;
+if(!$result = $db->sql_query($sql))
+{
+ message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
+}
+else
+{
+ $board_config = $db->sql_fetchrow($result);
+}
+
+$newconfigtable = $table_prefix . "newconfig";
+
+$sql = "SELECT config_name, config_value FROM ". CONFIG_TABLE;
+if( $result = $db->sql_query($sql) )
+{
+ die("Don't run this script twice!
\n");
+}
+
+$sql = " CREATE TABLE $newconfigtable (
+ config_name varchar(255) NOT NULL,
+ config_value varchar(255) NOT NULL,
+ PRIMARY KEY (config_name)
+ )";
+print "Creating temporary table: $newconfigtable
\n";
+if( !$result = $db->sql_query($sql) )
+{
+ print("Couldn't create new config table
\n");
+}
+
+$error = 0;
+while (list($name, $value) = each($board_config))
+{
+ if(is_int($name))
+ {
+ // Skip numeric array elements (we only want the associative array)
+ continue;
+ }
+
+ // Rename sys_template
+ if ($name == 'sys_template')
+ {
+ $name = 'board_template';
+ }
+ // Rename system_timezone
+ if ($name == 'system_timezone')
+ {
+ $name = 'board_timezone';
+ }
+ print "$name = $value
\n";
+ $value = addslashes($value);
+ $sql = "INSERT INTO $newconfigtable (config_name, config_value) VALUES ('$name', '$value')";
+ if( !$result = $db->sql_query($sql) )
+ {
+ print("Couldn't insert '$name' into new config table");
+ $error = 1;
+ }
+}
+
+if ($error != 1)
+{
+ print "Dropping old table
\n"; + $sql = "DROP TABLE ". CONFIG_TABLE; + if( !$result = $db->sql_query($sql) ) + { + die("Couldn't drop old table"); + } + print "Renaming $newconfigtable to ".CONFIG_TABLE."
\n";
+ $sql = "ALTER TABLE $newconfigtable RENAME ".CONFIG_TABLE;
+ if( !$result = $db->sql_query($sql) )
+ {
+ die("Couldn't rename new config table");
+ }
+ print "Renaming ".SESSIONS_TABLE." to ".$table_prefix."sessions
\n";
+ $sql = "ALTER TABLE ".SESSIONS_TABLE." RENAME ".$table_prefix."sessions";
+ if( !$result = $db->sql_query($sql) )
+ {
+ die("Couldn't rename session table");
+ }
+
+}
+
+$db->sql_close();
+
+ echo "
COMPLETE
";
+
+?>
diff --git a/phpBB/groupcp.php b/phpBB/groupcp.php
index 305fbf1e68..232d2a8aec 100644
--- a/phpBB/groupcp.php
+++ b/phpBB/groupcp.php
@@ -67,7 +67,7 @@ if( isset($HTTP_POST_VARS['joingroup']) )
$moderator = $db->sql_fetchrowset($result);
- $email_headers = "From: " . $board_config['board_email_from'] . "\r\n";
+ $email_headers = "From: " . $board_config['board_email'] . "\r\n";
$emailer->use_template("group_request");
$emailer->email_address($moderator[0]['user_email']);
@@ -78,7 +78,7 @@ if( isset($HTTP_POST_VARS['joingroup']) )
"SITENAME" => $board_config['sitename'],
"GROUP_MODERATOR" => $moderator[0]['username'],
"U_GROUPCP" => "http://".$SERVER_NAME.$PHP_SELF."?".POST_GROUPS_URL."=".$HTTP_POST_VARS[POST_GROUPS_URL],
- "EMAIL_SIG" => $board_config['board_email'])
+ "EMAIL_SIG" => $board_config['email_sig'])
);
$emailer->send();
$emailer->reset();
@@ -213,7 +213,7 @@ else if( isset($HTTP_GET_VARS[POST_GROUPS_URL]) || isset($HTTP_POST_VARS[POST_GR
$group_name_row = $db->sql_fetchrow($result);
$group_name = $group_name_row['group_name'];
- $email_headers = "From: " . $board_config['board_email_from'] . "\r\n";
+ $email_headers = "From: " . $board_config['board_email'] . "\r\n";
$emailer->use_template("group_approved");
$emailer->extra_headers($email_headers);
$emailer->set_subject($lang['Group_approved']);
@@ -231,7 +231,7 @@ else if( isset($HTTP_GET_VARS[POST_GROUPS_URL]) || isset($HTTP_POST_VARS[POST_GR
"SITENAME" => $board_config['sitename'],
"U_GROUPCP" => "http://".$SERVER_NAME.$PHP_SELF."?".POST_GROUPS_URL."=$group_id",
"GROUP_NAME" => $group_name,
- "EMAIL_SIG" => $board_config['board_email'])
+ "EMAIL_SIG" => $board_config['email_sig'])
);
$emailer->send();
$emailer->reset();
@@ -386,7 +386,7 @@ else if( isset($HTTP_GET_VARS[POST_GROUPS_URL]) || isset($HTTP_POST_VARS[POST_GR
$from = stripslashes($group_members[$i]['user_from']);
- $joined = create_date($board_config['default_dateformat'], $group_members[$i]['user_regdate'], $board_config['default_timezone']);
+ $joined = create_date($board_config['default_dateformat'], $group_members[$i]['user_regdate'], $board_config['board_timezone']);
$posts = ($group_members[$i]['user_posts']) ? $group_members[$i]['user_posts'] : 0;
@@ -542,7 +542,7 @@ else if( isset($HTTP_GET_VARS[POST_GROUPS_URL]) || isset($HTTP_POST_VARS[POST_GR
$from = stripslashes($modgroup_pending_list[$i]['user_from']);
- $joined = create_date($board_config['default_dateformat'], $modgroup_pending_list[$i]['user_regdate'], $board_config['default_timezone']);
+ $joined = create_date($board_config['default_dateformat'], $modgroup_pending_list[$i]['user_regdate'], $board_config['board_timezone']);
$posts = ($modgroup_pending_list[$i]['user_posts']) ? $modgroup_pending_list[$i]['user_posts'] : 0;
@@ -754,4 +754,4 @@ else
//
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
-?>
\ No newline at end of file
+?>
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index 79d44a885b..af19e9dbd0 100644
--- a/phpBB/includes/constants.php
+++ b/phpBB/includes/constants.php
@@ -152,7 +152,7 @@ define('PRIVMSGS_TEXT_TABLE', $table_prefix.'privmsgs_text');
define('PRIVMSGS_IGNORE_TABLE', $table_prefix.'privmsgs_ignore');
define('PRUNE_TABLE', $table_prefix.'forum_prune');
define('RANKS_TABLE', $table_prefix.'ranks');
-define('SESSIONS_TABLE', $table_prefix.'session');
+define('SESSIONS_TABLE', $table_prefix.'sessions');
define('SMILIES_TABLE', $table_prefix.'smilies');
define('THEMES_TABLE', $table_prefix.'themes');
define('TOPICS_TABLE', $table_prefix.'topics');
@@ -164,4 +164,4 @@ define('VOTE_DESC_TABLE', $table_prefix.'vote_desc');
define('VOTE_RESULTS_TABLE', $table_prefix.'vote_results');
define('VOTE_USERS_TABLE', $table_prefix.'vote_voters');
-?>
\ No newline at end of file
+?>
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 527bb81017..bcde9d7dcb 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -259,24 +259,24 @@ function init_userprefs($userdata)
if(isset($userdata['user_timezone']))
{
- $board_config['default_timezone'] = $userdata['user_timezone'];
+ $board_config['board_timezone'] = $userdata['user_timezone'];
}
if(!empty($userdata['user_template']))
{
- $board_config['default_template'] = $userdata['user_template'];
+ $board_config['board_template'] = $userdata['user_template'];
}
}
- $template = new Template($phpbb_root_path . "templates/" . $board_config['default_template']);
+ $template = new Template($phpbb_root_path . "templates/" . $board_config['board_template']);
if($template)
{
- @include($phpbb_root_path . "templates/" . $board_config['default_template'] . "/" . $board_config['default_template'] . ".cfg");
+ @include($phpbb_root_path . "templates/" . $board_config['board_template'] . "/" . $board_config['board_template'] . ".cfg");
if( !defined("TEMPLATE_CONFIG") )
{
- message_die(CRITICAL_ERROR, "Couldn't open " . $board_config['default_template'] . " template config file");
+ message_die(CRITICAL_ERROR, "Couldn't open " . $board_config['board_template'] . " template config file");
}
}
@@ -713,13 +713,13 @@ function sync($type, $id)
}
-function language_select($default, $dirname="language/")
+function language_select($default, $select_name, $dirname="language/")
{
global $phpEx;
$dir = opendir($dirname);
- $lang_select = "