aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/functions_profile_fields.php13
-rw-r--r--phpBB/includes/functions_user.php4
-rw-r--r--phpBB/styles/prosilver/template/ucp_profile_profile_info.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_register.html2
4 files changed, 10 insertions, 11 deletions
diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php
index 516a4570b8..f3ebe429cd 100644
--- a/phpBB/includes/functions_profile_fields.php
+++ b/phpBB/includes/functions_profile_fields.php
@@ -14,7 +14,7 @@
*/
class custom_profile
{
- var $profile_types = array(1 => 'int', 2 => 'string', 3 => 'text', 4 => 'bool', 5 => 'dropdown', 6 => 'date');
+ var $profile_types = array(FIELD_INT => 'int', FIELD_STRING => 'string', FIELD_TEXT => 'text', FIELD_BOOL => 'bool', FIELD_DROPDOWN => 'dropdown', FIELD_DATE => 'date');
var $profile_cache = array();
var $options_lang = array();
@@ -69,7 +69,7 @@ class custom_profile
'LANG_NAME' => $row['lang_name'],
'LANG_EXPLAIN' => $row['lang_explain'],
'FIELD' => $tpl_snippet,
- 'FIELD_ID' => ($type == 6 || ($type == 4 && $row['field_length'] == '1')) ? '' : 'pf_' . $row['field_ident'],
+ 'FIELD_ID' => ($type == FIELD_DATE || ($type == FIELD_BOOL && $row['field_length'] == '1')) ? '' : 'pf_' . $row['field_ident'],
'S_REQUIRED' => ($row['field_required']) ? true : false)
);
}
@@ -528,7 +528,7 @@ class custom_profile
}
else
{
- return $this->options_lang[$field_id][$lang_id][(int) ($value + 1)];
+ return $this->options_lang[$field_id][$lang_id][(int) ($value) + 1];
}
break;
@@ -547,8 +547,7 @@ class custom_profile
global $user;
$profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
- $user_ident = 'pf_' . str_replace('pf_', '', $profile_row['field_ident']);
-
+ $user_ident = $profile_row['field_ident'];
// checkbox - only testing for isset
if ($profile_row['field_type'] == FIELD_BOOL && $profile_row['field_length'] == 2)
{
@@ -619,7 +618,7 @@ class custom_profile
global $user, $template;
$profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
- $user_ident = 'pf_' . str_replace('pf_', '', $profile_row['field_ident']);
+ $user_ident = $profile_row['field_ident'];
$now = getdate();
@@ -994,7 +993,7 @@ class custom_profile_admin extends custom_profile
);
$options = array(
- 0 => array('TITLE' => $user->lang['FIELD_TYPE'], 'EXPLAIN' => $user->lang['BOOL_TYPE_EXPLAIN'], 'FIELD' => '<label><input type="radio" class="radio" name="field_length" value="1"' . (($this->vars['field_length'] == 1) ? ' checked="checked"' : '') . ' /> ' . $user->lang['RADIO_BUTTONS'] . '</label><label><input type="radio" class="radio" name="field_length" value="2"' . (($this->vars['field_length'] == 2) ? ' checked="checked"' : '') . ' /> ' . $user->lang['CHECKBOX'] . '</label>'),
+ 0 => array('TITLE' => $user->lang['FIELD_TYPE'], 'EXPLAIN' => $user->lang['BOOL_TYPE_EXPLAIN'], 'FIELD' => '<label><input type="radio" class="radio" name="field_length" value="1"' . (($this->vars['field_length'] == 1) ? ' checked="checked"' : '') . ' onchange="document.getElementById(\'add_profile_field\').submit();" /> ' . $user->lang['RADIO_BUTTONS'] . '</label><label><input type="radio" class="radio" name="field_length" value="2"' . (($this->vars['field_length'] == 2) ? ' checked="checked"' : '') . ' onchange="document.getElementById(\'add_profile_field\').submit();" /> ' . $user->lang['CHECKBOX'] . '</label>'),
1 => array('TITLE' => $user->lang['DEFAULT_VALUE'], 'FIELD' => $this->process_field_row('preview', $profile_row))
);
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 35c3ace106..2ebcc30e81 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -730,11 +730,11 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
$clean_name = utf8_clean_string($username);
if ($clean_name == $user->data['username_clean'])
{
- trigger_error('CANNOT_BAN_YOURSELF');
+ trigger_error('CANNOT_BAN_YOURSELF', E_USER_WARNING);
}
if (in_array($clean_name, $founder_names))
{
- trigger_error('CANNOT_BAN_FOUNDER');
+ trigger_error('CANNOT_BAN_FOUNDER', E_USER_WARNING);
}
$sql_usernames[] = $clean_name;
}
diff --git a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
index 39c8ff48b2..329597f542 100644
--- a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
+++ b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
@@ -58,7 +58,7 @@
<!-- ENDIF -->
<!-- BEGIN profile_fields -->
<dl>
- <dt><label for="{profile_fields.FIELD_ID}">{profile_fields.LANG_NAME}:<!-- IF profile_fields.S_REQUIRED --> *<!-- ENDIF --></label>
+ <dt><label <!-- IF profile_fields.FIELD_ID -->for="{profile_fields.FIELD_ID}"<!-- ENDIF -->>{profile_fields.LANG_NAME}:<!-- IF profile_fields.S_REQUIRED --> *<!-- ENDIF --></label>
<!-- IF profile_fields.LANG_EXPLAIN --><br /><span>{profile_fields.LANG_EXPLAIN}</span><!-- ENDIF --></dt>
<!-- IF profile_fields.ERROR --><dd class="error">{profile_fields.ERROR}</dd><!-- ENDIF -->
<dd>{profile_fields.FIELD}</dd>
diff --git a/phpBB/styles/prosilver/template/ucp_register.html b/phpBB/styles/prosilver/template/ucp_register.html
index e9e17fc2cf..66245f3e6d 100644
--- a/phpBB/styles/prosilver/template/ucp_register.html
+++ b/phpBB/styles/prosilver/template/ucp_register.html
@@ -63,7 +63,7 @@
<!-- BEGIN profile_fields -->
<dl>
- <dt><label for="{profile_fields.FIELD_ID}">{profile_fields.LANG_NAME}:<!-- IF profile_fields.S_REQUIRED --> *<!-- ENDIF --></label>
+ <dt><label <!-- IF profile_fields.FIELD_ID -->for="{profile_fields.FIELD_ID}" <!-- ENDIF -->>{profile_fields.LANG_NAME}:<!-- IF profile_fields.S_REQUIRED --> *<!-- ENDIF --></label>
<!-- IF profile_fields.LANG_EXPLAIN --><br /><span>{profile_fields.LANG_EXPLAIN}</span><!-- ENDIF -->
<!-- IF profile_fields.ERROR --><br /><span class="error">{profile_fields.ERROR}</span><!-- ENDIF --></dt>
<dd>{profile_fields.FIELD}</dd>