aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-03-09 04:42:16 -0500
committerOleg Pudeyev <oleg@bsdpower.com>2012-03-09 04:42:16 -0500
commit5c4788a24c0d776831bc1ebd206ae6ff8ffd2ce9 (patch)
tree6d1bb7939148f67420002bc4d3b2ec9bf31acfa8 /phpBB/includes
parent35309de0b77e8af18a03a2da5b8196668164c040 (diff)
parent0ec8e9dbff7d71e9a60ec8de8a15ba8f28ccdc04 (diff)
downloadforums-5c4788a24c0d776831bc1ebd206ae6ff8ffd2ce9.tar
forums-5c4788a24c0d776831bc1ebd206ae6ff8ffd2ce9.tar.gz
forums-5c4788a24c0d776831bc1ebd206ae6ff8ffd2ce9.tar.bz2
forums-5c4788a24c0d776831bc1ebd206ae6ff8ffd2ce9.tar.xz
forums-5c4788a24c0d776831bc1ebd206ae6ff8ffd2ce9.zip
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/9084] Explain the logic. [ticket/9084] Don't hide 'non-entered' dropdown CPF value if not required
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions_profile_fields.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php
index 26c4283f67..334e7e6adc 100644
--- a/phpBB/includes/functions_profile_fields.php
+++ b/phpBB/includes/functions_profile_fields.php
@@ -570,7 +570,12 @@ class custom_profile
$this->get_option_lang($field_id, $lang_id, FIELD_DROPDOWN, false);
}
- if ($value == $ident_ary['data']['field_novalue'])
+ // If a dropdown field is required, users
+ // cannot choose the "no value" option.
+ // They must choose one of the other options.
+ // Therefore, here we treat a value equal to
+ // the "no value" as a lack of value, i.e. NULL.
+ if ($value == $ident_ary['data']['field_novalue'] && $ident_ary['data']['field_required'])
{
return NULL;
}