diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2014-01-14 15:08:33 +0100 |
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2014-01-14 15:08:33 +0100 |
| commit | cd6bdc7b2719bea5c89e96efa5b175ed54a6b496 (patch) | |
| tree | fa1b7ae4840ba58afde4fa375a63dff267c4223b /phpBB/phpbb/profilefields/profilefields.php | |
| parent | 9dec023632ae09dd457982db4a5e68fa3bb49887 (diff) | |
| download | forums-cd6bdc7b2719bea5c89e96efa5b175ed54a6b496.tar forums-cd6bdc7b2719bea5c89e96efa5b175ed54a6b496.tar.gz forums-cd6bdc7b2719bea5c89e96efa5b175ed54a6b496.tar.bz2 forums-cd6bdc7b2719bea5c89e96efa5b175ed54a6b496.tar.xz forums-cd6bdc7b2719bea5c89e96efa5b175ed54a6b496.zip | |
[ticket/11201] Remove remaining type depending code to type class
PHPBB3-11201
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); } |
