diff options
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/acp/acp_profile.php | 6 | ||||
-rw-r--r-- | phpBB/phpbb/profilefields/profilefields.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/profilefields/type/type_base.php | 10 | ||||
-rw-r--r-- | phpBB/phpbb/profilefields/type/type_bool.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/profilefields/type/type_date.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/profilefields/type/type_dropdown.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/profilefields/type/type_int.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/profilefields/type/type_interface.php | 11 | ||||
-rw-r--r-- | phpBB/phpbb/profilefields/type/type_string.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/profilefields/type/type_text.php | 2 |
10 files changed, 28 insertions, 13 deletions
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php index feb8265cf5..d7a733eded 100644 --- a/phpBB/includes/acp/acp_profile.php +++ b/phpBB/includes/acp/acp_profile.php @@ -625,7 +625,7 @@ class acp_profile 'S_FIELD_NO_VIEW' => ($cp->vars['field_no_view']) ? true : false, 'L_LANG_SPECIFIC' => sprintf($user->lang['LANG_SPECIFIC_OPTIONS'], $config['default_lang']), - 'FIELD_TYPE' => $user->lang['FIELD_' . strtoupper($profile_field->get_name())], + 'FIELD_TYPE' => $profile_field->get_name(), 'FIELD_IDENT' => $cp->vars['field_ident'], 'LANG_NAME' => $cp->vars['lang_name'], 'LANG_EXPLAIN' => $cp->vars['lang_explain'], @@ -712,7 +712,7 @@ class acp_profile $profile_field = $this->type_collection[$row['field_type']]; $template->assign_block_vars('fields', array( 'FIELD_IDENT' => $row['field_ident'], - 'FIELD_TYPE' => $user->lang['FIELD_' . strtoupper($profile_field->get_name())], + 'FIELD_TYPE' => $profile_field->get_name(), 'L_ACTIVATE_DEACTIVATE' => $user->lang[$active_lang], 'U_ACTIVATE_DEACTIVATE' => $this->u_action . "&action=$active_value&field_id=$id", @@ -736,7 +736,7 @@ class acp_profile $s_select_type = ''; foreach ($this->type_collection as $key => $profile_field) { - $s_select_type .= '<option value="' . $key . '">' . $user->lang['FIELD_' . strtoupper($profile_field->get_name())] . '</option>'; + $s_select_type .= '<option value="' . $key . '">' . $profile_field->get_name() . '</option>'; } $template->assign_vars(array( diff --git a/phpBB/phpbb/profilefields/profilefields.php b/phpBB/phpbb/profilefields/profilefields.php index 8b1e10e78d..f63064bd56 100644 --- a/phpBB/phpbb/profilefields/profilefields.php +++ b/phpBB/phpbb/profilefields/profilefields.php @@ -322,7 +322,7 @@ class profilefields // empty previously filled blockvars foreach ($this->type_collection as $field_key => $field_type) { - $this->template->destroy_block_vars($field_type->get_name()); + $this->template->destroy_block_vars($field_type->get_name_short()); } // Assign template variables diff --git a/phpBB/phpbb/profilefields/type/type_base.php b/phpBB/phpbb/profilefields/type/type_base.php index 195186ec86..6961d208e9 100644 --- a/phpBB/phpbb/profilefields/type/type_base.php +++ b/phpBB/phpbb/profilefields/type/type_base.php @@ -47,9 +47,17 @@ abstract class type_base implements type_interface /** * {@inheritDoc} */ + public function get_name() + { + return $this->user->lang('FIELD_' . strtoupper($this->get_name_short())); + } + + /** + * {@inheritDoc} + */ public function get_service_name() { - return 'profilefields.type.' . $this->get_name(); + return 'profilefields.type.' . $this->get_name_short(); } /** diff --git a/phpBB/phpbb/profilefields/type/type_bool.php b/phpBB/phpbb/profilefields/type/type_bool.php index f5f9003e6f..68d17fb4cf 100644 --- a/phpBB/phpbb/profilefields/type/type_bool.php +++ b/phpBB/phpbb/profilefields/type/type_bool.php @@ -63,7 +63,7 @@ class type_bool extends type_base /** * {@inheritDoc} */ - public function get_name() + public function get_name_short() { return 'bool'; } diff --git a/phpBB/phpbb/profilefields/type/type_date.php b/phpBB/phpbb/profilefields/type/type_date.php index 9b13cbac2e..f874ff33c3 100644 --- a/phpBB/phpbb/profilefields/type/type_date.php +++ b/phpBB/phpbb/profilefields/type/type_date.php @@ -55,7 +55,7 @@ class type_date extends type_base /** * {@inheritDoc} */ - public function get_name() + public function get_name_short() { return 'date'; } diff --git a/phpBB/phpbb/profilefields/type/type_dropdown.php b/phpBB/phpbb/profilefields/type/type_dropdown.php index 6bbd3f0842..5596e8f172 100644 --- a/phpBB/phpbb/profilefields/type/type_dropdown.php +++ b/phpBB/phpbb/profilefields/type/type_dropdown.php @@ -63,7 +63,7 @@ class type_dropdown extends type_base /** * {@inheritDoc} */ - public function get_name() + public function get_name_short() { return 'dropdown'; } diff --git a/phpBB/phpbb/profilefields/type/type_int.php b/phpBB/phpbb/profilefields/type/type_int.php index 8e43a6e312..6ffc8fbea0 100644 --- a/phpBB/phpbb/profilefields/type/type_int.php +++ b/phpBB/phpbb/profilefields/type/type_int.php @@ -47,7 +47,7 @@ class type_int extends type_base /** * {@inheritDoc} */ - public function get_name() + public function get_name_short() { return 'int'; } diff --git a/phpBB/phpbb/profilefields/type/type_interface.php b/phpBB/phpbb/profilefields/type/type_interface.php index 5a88200bad..7d0cf7662f 100644 --- a/phpBB/phpbb/profilefields/type/type_interface.php +++ b/phpBB/phpbb/profilefields/type/type_interface.php @@ -12,13 +12,20 @@ namespace phpbb\profilefields\type; interface type_interface { /** - * Get the name of the type, used for error messages and template loops + * Get the translated name of the type * - * @return string lowercase version of the fields type + * @return string Translated name of the field type */ public function get_name(); /** + * Get the short name of the type, used for error messages and template loops + * + * @return string lowercase version of the fields type + */ + public function get_name_short(); + + /** * Get the name of service representing the type * * @return string lowercase version of the fields type diff --git a/phpBB/phpbb/profilefields/type/type_string.php b/phpBB/phpbb/profilefields/type/type_string.php index 8b3dd1f73d..12a14d9b83 100644 --- a/phpBB/phpbb/profilefields/type/type_string.php +++ b/phpBB/phpbb/profilefields/type/type_string.php @@ -47,7 +47,7 @@ class type_string extends type_string_common /** * {@inheritDoc} */ - public function get_name() + public function get_name_short() { return 'string'; } diff --git a/phpBB/phpbb/profilefields/type/type_text.php b/phpBB/phpbb/profilefields/type/type_text.php index 26671d2129..660bb20ef8 100644 --- a/phpBB/phpbb/profilefields/type/type_text.php +++ b/phpBB/phpbb/profilefields/type/type_text.php @@ -47,7 +47,7 @@ class type_text extends type_string_common /** * {@inheritDoc} */ - public function get_name() + public function get_name_short() { return 'text'; } |