aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_profile_fields.php
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2011-01-17 00:01:04 +0700
committerrxu <rxu@mail.ru>2012-01-18 22:33:51 +0800
commit99164cd20b9d8ca77b1e9a54e0958cdb580945d0 (patch)
tree5362923038b2214e393e6f9708e2b36e33cf1aec /phpBB/includes/functions_profile_fields.php
parentd7aa3aab5e40747e71d091d8033207f4363fb59c (diff)
downloadforums-99164cd20b9d8ca77b1e9a54e0958cdb580945d0.tar
forums-99164cd20b9d8ca77b1e9a54e0958cdb580945d0.tar.gz
forums-99164cd20b9d8ca77b1e9a54e0958cdb580945d0.tar.bz2
forums-99164cd20b9d8ca77b1e9a54e0958cdb580945d0.tar.xz
forums-99164cd20b9d8ca77b1e9a54e0958cdb580945d0.zip
[ticket/9831] Correctly store checkbox default value for boolean CPF.
PHPBB3-9831
Diffstat (limited to 'phpBB/includes/functions_profile_fields.php')
-rw-r--r--phpBB/includes/functions_profile_fields.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php
index 1eae2a9ad6..7874608009 100644
--- a/phpBB/includes/functions_profile_fields.php
+++ b/phpBB/includes/functions_profile_fields.php
@@ -625,10 +625,10 @@ class custom_profile
$profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
$user_ident = $profile_row['field_ident'];
- // checkbox - only testing for isset
+ // checkbox - set the value to "true" if it has been set to 1
if ($profile_row['field_type'] == FIELD_BOOL && $profile_row['field_length'] == 2)
{
- $value = (isset($_REQUEST[$profile_row['field_ident']])) ? true : ((!isset($user->profile_fields[$user_ident]) || $preview) ? $default_value : $user->profile_fields[$user_ident]);
+ $value = (isset($_REQUEST[$profile_row['field_ident']]) && request_var($profile_row['field_ident'], $default_value) == 1) ? true : ((!isset($user->profile_fields[$user_ident]) || $preview) ? $default_value : $user->profile_fields[$user_ident]);
}
else if ($profile_row['field_type'] == FIELD_INT)
{