mirror of
https://github.com/phpbb/phpbb.git
synced 2025-10-04 11:41:38 +02:00
Updated and fixed various issues, see post in developers forum for info
git-svn-id: file:///svn/phpbb/trunk@1083 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -46,17 +46,8 @@ else
|
||||
|
||||
if( isset($HTTP_POST_VARS['submit']) )
|
||||
{
|
||||
if( $config_name == "default_theme" )
|
||||
{
|
||||
$new[$config_name] = substr($HTTP_POST_VARS['board_style'], strrpos($HTTP_POST_VARS['board_style'], "_") + 1);
|
||||
}
|
||||
else if( $config_name == "board_template" )
|
||||
{
|
||||
$new[$config_name] = substr($HTTP_POST_VARS['board_style'], 0, strrpos($HTTP_POST_VARS['board_style'], "_"));
|
||||
}
|
||||
|
||||
$sql = "UPDATE " . CONFIG_TABLE . " SET
|
||||
config_value = '".$new[$config_name]."'
|
||||
config_value = '" . $new[$config_name] . "'
|
||||
WHERE config_name = '$config_name'";
|
||||
if( !$db->sql_query($sql) )
|
||||
{
|
||||
@@ -71,18 +62,24 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
$style_select = style_select($new['board_template'], $new['default_theme'], 'board_style', "../templates");
|
||||
$style_select = style_select($new['default_style'], 'default_style', "../templates");
|
||||
$admin_style_select = style_select($new['default_admin_style'], 'default_admin_style', "../templates");
|
||||
$lang_select = language_select($new['default_lang'], 'default_lang', "../language");
|
||||
$timezone_select = tz_select($new['board_timezone'], 'board_timezone');
|
||||
|
||||
$override_user_style_yes = ($new['override_user_style']) ? "checked=\"checked\"" : "";
|
||||
$override_user_style_no = (!$new['override_user_style']) ? "checked=\"checked\"" : "";
|
||||
$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\"" : "";
|
||||
$activation_none = ($new['require_activation'] == ACTIVATION_NONE) ? "checked=\"checked\"" : "";
|
||||
$activation_user = ($new['require_activation'] == ACTIVATION_USER) ? "checked=\"checked\"" : "";
|
||||
$activation_admin = ($new['require_activation'] == ACTIVATION_ADMIN) ? "checked=\"checked\"" : "";
|
||||
$gzip_yes = ($new['gzip_compress']) ? "checked=\"checked\"" : "";
|
||||
$gzip_no = (!$new['gzip_compress']) ? "checked=\"checked\"" : "";
|
||||
$prune_yes = ($new['prune_enable']) ? "checked=\"checked\"" : "";
|
||||
$prune_no = (!$new['prune_enable']) ? "checked=\"checked\"" : "";
|
||||
$smile_yes = ($new['allow_smilies']) ? "checked=\"checked\"" : "";
|
||||
$smile_no = (!$new['allow_smilies']) ? "checked=\"checked\"" : "";
|
||||
$sig_yes = ($new['allow_sig']) ? "checked=\"checked\"" : "";
|
||||
@@ -105,19 +102,27 @@ $template->set_filenames(array(
|
||||
$template->assign_vars(array(
|
||||
"S_CONFIG_ACTION" => append_sid("admin_board.$phpEx"),
|
||||
"SITENAME" => $new['sitename'],
|
||||
"ACTIVATION_YES" => $activation_yes,
|
||||
"ACTIVATION_NO" => $activation_no,
|
||||
"ACTIVATION_NONE" => ACTIVATION_NONE,
|
||||
"ACTIVATION_NONE_CHECKED" => $activation_none,
|
||||
"ACTIVATION_USER" => ACTIVATION_USER,
|
||||
"ACTIVATION_USER_CHECKED" => $activation_user,
|
||||
"ACTIVATION_ADMIN" => ACTIVATION_ADMIN,
|
||||
"ACTIVATION_ADMIN_CHECKED" => $activation_admin,
|
||||
"FLOOD_INTERVAL" => $new['flood_interval'],
|
||||
"TOPICS_PER_PAGE" => $new['topics_per_page'],
|
||||
"POSTS_PER_PAGE" => $new['posts_per_page'],
|
||||
"HOT_TOPIC" => $new['hot_threshold'],
|
||||
"STYLE_SELECT" => $style_select,
|
||||
"OVERRIDE_STYLE_YES" => $override_user_style_yes,
|
||||
"OVERRIDE_STYLE_NO" => $override_user_style_no,
|
||||
"LANG_SELECT" => $lang_select,
|
||||
"L_DATE_FORMAT_EXPLAIN" => $lang['Date_format_explain'],
|
||||
"DEFAULT_DATEFORMAT" => $new['default_dateformat'],
|
||||
"TIMEZONE_SELECT" => $timezone_select,
|
||||
"GZIP_YES" => $gzip_yes,
|
||||
"GZIP_NO" => $gzip_no,
|
||||
"PRUNE_YES" => $prune_yes,
|
||||
"PRUNE_NO" => $prune_no,
|
||||
"HTML_YES" => $html_yes,
|
||||
"HTML_NO" => $html_no,
|
||||
"BBCODE_YES" => $bbcode_yes,
|
||||
@@ -138,8 +143,9 @@ $template->assign_vars(array(
|
||||
"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'],
|
||||
"SMILIES_PATH" => $new['smilies_path'],
|
||||
"EMAIL_FROM" => $new['board_email'],
|
||||
"EMAIL_SIG" => $new['board_email_sig'],
|
||||
"SMTP_YES" => $smtp_yes,
|
||||
"SMTP_NO" => $smtp_no,
|
||||
"SMTP_HOST" => $new['smtp_host'])
|
||||
|
Reference in New Issue
Block a user