aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2011-11-25 18:15:00 +0100
committerAndreas Fischer <bantu@phpbb.com>2011-11-25 18:15:00 +0100
commit79443eb1d4cf31c754e0a0fc041bc583ae0005ad (patch)
treeb5409a21f6249191c707201cb33b7ea2bad62e9c /phpBB/includes
parent7b4fd00ae53c2cbf9492eef8aed95006c65ef8b4 (diff)
parentf856cc2ef69c40609c1ebe5494a22fdda5c6bb05 (diff)
downloadforums-79443eb1d4cf31c754e0a0fc041bc583ae0005ad.tar
forums-79443eb1d4cf31c754e0a0fc041bc583ae0005ad.tar.gz
forums-79443eb1d4cf31c754e0a0fc041bc583ae0005ad.tar.bz2
forums-79443eb1d4cf31c754e0a0fc041bc583ae0005ad.tar.xz
forums-79443eb1d4cf31c754e0a0fc041bc583ae0005ad.zip
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/10280] Change the display of user activation settings in the ACP.
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_board.php26
1 files changed, 15 insertions, 11 deletions
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index 890bac62b7..c99541ea7a 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -236,7 +236,7 @@ class acp_board
'max_name_chars' => array('lang' => 'USERNAME_LENGTH', 'validate' => 'int:8:180', 'type' => false, 'method' => false, 'explain' => false,),
'max_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:8:255', 'type' => false, 'method' => false, 'explain' => false,),
- 'require_activation' => array('lang' => 'ACC_ACTIVATION', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_acc_activation', 'explain' => true),
+ 'require_activation' => array('lang' => 'ACC_ACTIVATION', 'validate' => 'int', 'type' => 'select', 'method' => 'select_acc_activation', 'explain' => true),
'new_member_post_limit' => array('lang' => 'NEW_MEMBER_POST_LIMIT', 'validate' => 'int:0:255', 'type' => 'text:4:4', 'explain' => true, 'append' => ' ' . $user->lang['POSTS']),
'new_member_group_default'=> array('lang' => 'NEW_MEMBER_GROUP_DEFAULT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'min_name_chars' => array('lang' => 'USERNAME_LENGTH', 'validate' => 'int:1', 'type' => 'custom:5:180', 'method' => 'username_length', 'explain' => true),
@@ -772,24 +772,28 @@ class acp_board
/**
* Select account activation method
*/
- function select_acc_activation($value, $key = '')
+ function select_acc_activation($selected_value, $value)
{
global $user, $config;
- $radio_ary = array(
- USER_ACTIVATION_DISABLE => 'ACC_DISABLE',
- USER_ACTIVATION_NONE => 'ACC_NONE',
+ $act_ary = array(
+ 'ACC_DISABLE' => USER_ACTIVATION_DISABLE,
+ 'ACC_NONE' => USER_ACTIVATION_NONE,
);
-
if ($config['email_enable'])
{
- $radio_ary[USER_ACTIVATION_SELF] = 'ACC_USER';
- $radio_ary[USER_ACTIVATION_ADMIN] = 'ACC_ADMIN';
- }
+ $act_ary['ACC_USER'] = USER_ACTIVATION_SELF;
+ $act_ary['ACC_ADMIN'] = USER_ACTIVATION_ADMIN;
+ }
+ $act_options = '';
- $radio_text = h_radio('config[require_activation]', $radio_ary, $value, 'require_activation', $key, '<br />');
+ foreach ($act_ary as $key => $value)
+ {
+ $selected = ($selected_value == $value) ? ' selected="selected"' : '';
+ $act_options .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$key] . '</option>';
+ }
- return $radio_text;
+ return $act_options;
}
/**