diff options
Diffstat (limited to 'phpBB/phpbb/profilefields/profilefields.php')
-rw-r--r-- | phpBB/phpbb/profilefields/profilefields.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/phpBB/phpbb/profilefields/profilefields.php b/phpBB/phpbb/profilefields/profilefields.php index 78b408ba56..e01611460b 100644 --- a/phpBB/phpbb/profilefields/profilefields.php +++ b/phpBB/phpbb/profilefields/profilefields.php @@ -72,17 +72,15 @@ class profilefields { // Return templated field $tpl_snippet = $this->process_field_row('change', $row); - - // Some types are multivalue, we can't give them a field_id as we would not know which to pick - $type = (int) $row['field_type']; + $profile_field = $this->container->get('profilefields.type.' . $this->profile_types[$row['field_type']]); $this->template->assign_block_vars('profile_fields', array( 'LANG_NAME' => $row['lang_name'], 'LANG_EXPLAIN' => $row['lang_explain'], 'FIELD' => $tpl_snippet, - 'FIELD_ID' => ($type == FIELD_DATE || ($type == FIELD_BOOL && $row['field_length'] == '1')) ? '' : 'pf_' . $row['field_ident'], - 'S_REQUIRED' => ($row['field_required']) ? true : false) - ); + 'FIELD_ID' => $profile_field->get_field_ident($row), + 'S_REQUIRED' => ($row['field_required']) ? true : false, + )); } $this->db->sql_freeresult($result); } |