diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 387b8f1fb9..d4f32daf04 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -772,18 +772,19 @@ class acp_board { global $user, $config; - $radio_ary = array(USER_ACTIVATION_DISABLE => 'ACC_DISABLE', USER_ACTIVATION_NONE => 'ACC_NONE'); - $radio_text = h_radio('config[require_activation]', $radio_ary, $value, $key); + $radio_ary = array( + USER_ACTIVATION_DISABLE => 'ACC_DISABLE', + USER_ACTIVATION_NONE => 'ACC_NONE', + ); + if ($config['email_enable']) { - $radio_ary = array(USER_ACTIVATION_SELF => 'ACC_USER', USER_ACTIVATION_ADMIN => 'ACC_ADMIN'); - // With longer labels the four options no longer fit - // onto a single line. Separate them onto two lines. - // This also requires two h_radio calls to generate HTML. - $radio_text .= '

'; - $radio_text .= h_radio('config[require_activation]', $radio_ary, $value, $key); + $radio_ary[USER_ACTIVATION_SELF] = 'ACC_USER'; + $radio_ary[USER_ACTIVATION_ADMIN] = 'ACC_ADMIN'; } + $radio_text = h_radio('config[require_activation]', $radio_ary, $value, 'require_activation', $key, '
'); + return $radio_text; } diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php index f28bca91ee..5ff77855f0 100644 --- a/phpBB/includes/functions_acp.php +++ b/phpBB/includes/functions_acp.php @@ -164,7 +164,7 @@ function build_select($option_ary, $option_default = false) /** * Build radio fields in acp pages */ -function h_radio($name, &$input_ary, $input_default = false, $id = false, $key = false) +function h_radio($name, $input_ary, $input_default = false, $id = false, $key = false, $separator = '') { global $user; @@ -173,7 +173,7 @@ function h_radio($name, &$input_ary, $input_default = false, $id = false, $key = foreach ($input_ary as $value => $title) { $selected = ($input_default !== false && $value == $input_default) ? ' checked="checked"' : ''; - $html .= ''; + $html .= '' . $separator; $id_assigned = true; }