diff --git a/phpBB/adm/admin_board.php b/phpBB/adm/admin_board.php index d575852f4e..b46564205c 100644 --- a/phpBB/adm/admin_board.php +++ b/phpBB/adm/admin_board.php @@ -22,7 +22,7 @@ if (!empty($setmodules)) $module['GENERAL']['SERVER_SETTINGS'] = ($auth->acl_get('a_server')) ? "$filename$SID&mode=server" : ''; $module['GENERAL']['AUTH_SETTINGS'] = ($auth->acl_get('a_server')) ? "$filename$SID&mode=auth" : ''; $module['GENERAL']['LOAD_SETTINGS'] = ($auth->acl_get('a_server')) ? "$filename$SID&mode=load" : ''; - $module['USER']['KARMA_SETTINGS'] = ($auth->acl_get('a_users')) ? "$filename$SID&mode=karma" : ''; + $module['USER']['KARMA_SETTINGS'] = ($auth->acl_get('a_user')) ? "$filename$SID&mode=karma" : ''; return; } @@ -73,7 +73,7 @@ switch ($mode) break; case 'karma': $l_title = 'KARMA_SETTINGS'; - $which_auth = 'a_users'; + $which_auth = 'a_user'; break; default: return; @@ -86,8 +86,8 @@ if (!$auth->acl_get($which_auth)) } // Pull all config data -$sql = "SELECT * - FROM " . CONFIG_TABLE; +$sql = 'SELECT * + FROM ' . CONFIG_TABLE; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) @@ -96,11 +96,11 @@ while ($row = $db->sql_fetchrow($result)) $config_value = $row['config_value']; $default_config[$config_name] = $config_value; - $new[$config_name] = (isset($_POST[$config_name])) ? $_POST[$config_name] : $default_config[$config_name]; + $new[$config_name] = request_var($config_name, $default_config[$config_name]); if ($submit) { - set_config($config_name, str_replace('\\\\', '\\', addslashes($new[$config_name]))); + set_config($config_name, $new[$config_name]); } } @@ -241,8 +241,7 @@ switch ($mode) $attachments_yes = ($new['allow_attachments']) ? 'checked="checked"' : ''; $attachments_no = (!$new['allow_attachments']) ? 'checked="checked"' : ''; - // Caching screws up slashes so we fudge a solution - $user_char_ary = array('USERNAME_CHARS_ANY' => '.*', 'USERNAME_ALPHA_ONLY' => '[/w]+', 'USERNAME_ALPHA_SPACERS' => '[/w_/+/. /-/[/]]+'); + $user_char_ary = array('USERNAME_CHARS_ANY' => '.*', 'USERNAME_ALPHA_ONLY' => '[/w]+', 'USERNAME_ALPHA_SPACERS' => '[\w_\+\. \-\[\]]+'); $user_char_options = ''; foreach ($user_char_ary as $lang => $value) { @@ -434,14 +433,6 @@ switch ($mode) lang['FLOOD_INTERVAL']; ?>:
lang['FLOOD_INTERVAL_EXPLAIN']; ?> - - lang['MIN_SEARCH_CHARS']; ?>:
lang['MIN_SEARCH_CHARS_EXPLAIN']; ?> - - - - lang['MAX_SEARCH_CHARS']; ?>:
lang['MAX_SEARCH_CHARS_EXPLAIN']; ?> - - lang['TOPICS_PER_PAGE']; ?>: @@ -473,6 +464,9 @@ switch ($mode) $smtp_yes = ($new['smtp_delivery']) ? 'checked="checked"' : ''; $smtp_no = (!$new['smtp_delivery']) ? 'checked="checked"' : ''; + $smtp_auth_plain = ($new['smtp_auth_method'] == 'PLAIN' || !$new['smtp_auth_method']) ? 'checked="checked"' : ''; + $smtp_auth_login = ($new['smtp_auth_method'] == 'LOGIN') ? 'checked="checked"' : ''; + ?> lang['ENABLE_EMAIL']; ?>:
lang['ENABLE_EMAIL_EXPLAIN']; ?> @@ -510,6 +504,10 @@ switch ($mode) lang['SMTP_PORT']; ?>:
lang['SMTP_PORT_EXPLAIN']; ?> + + lang['SMTP_AUTH_METHOD']; ?>:
lang['SMTP_AUTH_METHOD_EXPLAIN']; ?> + /> lang['SMTP_PLAIN']; ?>   /> lang['SMTP_LOGIN']; ?> + lang['SMTP_USERNAME']; ?>:
lang['SMTP_USERNAME_EXPLAIN']; ?> @@ -647,6 +645,14 @@ switch ($mode) lang['SEARCH_INTERVAL']; ?>:
lang['SEARCH_INTERVAL_EXPLAIN']; ?> + + lang['MIN_SEARCH_CHARS']; ?>:
lang['MIN_SEARCH_CHARS_EXPLAIN']; ?> + + + + lang['MAX_SEARCH_CHARS']; ?>:
lang['MAX_SEARCH_CHARS_EXPLAIN']; ?> + + lang['YES_SEARCH_UPDATE']; ?>:
lang['YES_SEARCH_UPDATE_EXPLAIN']; ?> />lang['YES'] ?>    /> lang['NO']; ?> @@ -727,7 +733,7 @@ switch ($mode) ?> - lang['ENABLE_KARMA']; ?>: + lang['ENABLE_KARMA']; ?>: />lang['YES'] ?>    /> lang['NO']; ?>