diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-05-27 16:24:21 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-05-27 16:24:21 +0000 |
commit | ce4445f74a28eaee02c8d90c1a04a759cf88a9c3 (patch) | |
tree | fc3af067265d1df62ec14ae912fa5333a535b789 /phpBB/includes/functions_profile_fields.php | |
parent | b51b978854adf0e5cd902f01cd2da9f34f19429d (diff) | |
download | forums-ce4445f74a28eaee02c8d90c1a04a759cf88a9c3.tar forums-ce4445f74a28eaee02c8d90c1a04a759cf88a9c3.tar.gz forums-ce4445f74a28eaee02c8d90c1a04a759cf88a9c3.tar.bz2 forums-ce4445f74a28eaee02c8d90c1a04a759cf88a9c3.tar.xz forums-ce4445f74a28eaee02c8d90c1a04a759cf88a9c3.zip |
- remove description from profile fields
- added disclaimer about DEBUG_EXTRA to the ACP (i think this is needed - some idiots might think it is wise to have this enabled on a production board. :) We *may* let it there for the Betas though, but it will be removed during the RC's)
- some bugfixes
git-svn-id: file:///svn/phpbb/trunk@5973 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_profile_fields.php')
-rw-r--r-- | phpBB/includes/functions_profile_fields.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php index 4ab5cf39cb..94b7e9a443 100644 --- a/phpBB/includes/functions_profile_fields.php +++ b/phpBB/includes/functions_profile_fields.php @@ -520,15 +520,16 @@ 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 = str_replace('pf_', '', $profile_row['field_ident']); // checkbox - only testing for isset if ($profile_row['field_type'] == FIELD_BOOL && $profile_row['field_length'] == 2) { - $value = (isset($_REQUEST[$profile_row['field_ident']])) ? true : ((!isset($user->profile_fields[str_replace('pf_', '', $profile_row['field_ident'])]) || $preview) ? $default_value : $user->profile_fields[str_replace('pf_', '', $profile_row['field_ident'])]); + $value = (isset($_REQUEST[$profile_row['field_ident']])) ? true : ((!isset($user->profile_fields[$user_ident]) || $preview) ? $default_value : $user->profile_fields[$user_ident]); } else { - $value = (isset($_REQUEST[$profile_row['field_ident']])) ? request_var($profile_row['field_ident'], $default_value, true) : ((!isset($user->profile_fields[str_replace('pf_', '', $profile_row['field_ident'])]) || $preview) ? $default_value : $user->profile_fields[str_replace('pf_', '', $profile_row['field_ident'])]); + $value = (isset($_REQUEST[$profile_row['field_ident']])) ? request_var($profile_row['field_ident'], $default_value, true) : ((!isset($user->profile_fields[$user_ident]) || $preview) ? $default_value : $user->profile_fields[$user_ident]); } switch ($field_validation) @@ -562,6 +563,8 @@ 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 = str_replace('pf_', '', $profile_row['field_ident']); + $now = getdate(); if (!isset($_REQUEST[$profile_row['field_ident'] . '_day'])) @@ -570,14 +573,14 @@ class custom_profile { $profile_row['field_default_value'] = sprintf('%2d-%2d-%4d', $now['mday'], $now['mon'], $now['year']); } - list($day, $month, $year) = explode('-', ((!isset($user->profile_fields[$profile_row['field_ident']]) || $preview) ? $profile_row['field_default_value'] : $user->profile_fields[$profile_row['field_ident']])); + list($day, $month, $year) = explode('-', ((!isset($user->profile_fields[$user_ident]) || $preview) ? $profile_row['field_default_value'] : $user->profile_fields[$user_ident])); } else { if ($preview && $profile_row['field_default_value'] == 'now') { $profile_row['field_default_value'] = sprintf('%2d-%2d-%4d', $now['mday'], $now['mon'], $now['year']); - list($day, $month, $year) = explode('-', ((!isset($user->profile_fields[$profile_row['field_ident']]) || $preview) ? $profile_row['field_default_value'] : $user->profile_fields[$profile_row['field_ident']])); + list($day, $month, $year) = explode('-', ((!isset($user->profile_fields[$user_ident]) || $preview) ? $profile_row['field_default_value'] : $user->profile_fields[$user_ident])); } else { |