aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/profilefields
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/profilefields')
-rw-r--r--phpBB/phpbb/profilefields/manager.php2
-rw-r--r--phpBB/phpbb/profilefields/type/type_googleplus.php8
-rw-r--r--phpBB/phpbb/profilefields/type/type_interface.php2
-rw-r--r--phpBB/phpbb/profilefields/type/type_string_common.php11
4 files changed, 13 insertions, 10 deletions
diff --git a/phpBB/phpbb/profilefields/manager.php b/phpBB/phpbb/profilefields/manager.php
index f3b1676799..98802d2209 100644
--- a/phpBB/phpbb/profilefields/manager.php
+++ b/phpBB/phpbb/profilefields/manager.php
@@ -397,7 +397,7 @@ class manager
}
$field_desc = $contact_url = '';
- if ($use_contact_fields)
+ if ($use_contact_fields && $ident_ary['data']['field_is_contact'])
{
$value = $profile_field->get_profile_contact_value($ident_ary['value'], $ident_ary['data']);
$field_desc = $this->user->lang($ident_ary['data']['field_contact_desc']);
diff --git a/phpBB/phpbb/profilefields/type/type_googleplus.php b/phpBB/phpbb/profilefields/type/type_googleplus.php
index df1bcc7f4b..887baa3de1 100644
--- a/phpBB/phpbb/profilefields/type/type_googleplus.php
+++ b/phpBB/phpbb/profilefields/type/type_googleplus.php
@@ -18,6 +18,14 @@ class type_googleplus extends type_string
/**
* {@inheritDoc}
*/
+ public function get_name()
+ {
+ return $this->user->lang('FIELD_GOOGLEPLUS');
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public function get_service_name()
{
return 'profilefields.type.googleplus';
diff --git a/phpBB/phpbb/profilefields/type/type_interface.php b/phpBB/phpbb/profilefields/type/type_interface.php
index 2dd13fa480..ec770f9467 100644
--- a/phpBB/phpbb/profilefields/type/type_interface.php
+++ b/phpBB/phpbb/profilefields/type/type_interface.php
@@ -189,8 +189,8 @@ interface type_interface
/**
* Allows manipulating the intended variables if needed
*
- * @param string $key Name of the option
* @param int $step Step on which the option is hidden
+ * @param string $key Name of the option
* @param string $action Currently performed action (create|edit)
* @param array $field_data Array with data for this field
* @return mixed Final value of the option
diff --git a/phpBB/phpbb/profilefields/type/type_string_common.php b/phpBB/phpbb/profilefields/type/type_string_common.php
index c2b951b6c9..0eaf7e527d 100644
--- a/phpBB/phpbb/profilefields/type/type_string_common.php
+++ b/phpBB/phpbb/profilefields/type/type_string_common.php
@@ -98,7 +98,7 @@ abstract class type_string_common extends type_base
*/
public function get_profile_value($field_value, $field_data)
{
- if (!$field_value && !$field_data['field_show_novalue'])
+ if (($field_value === null || $field_value === '') && !$field_data['field_show_novalue'])
{
return null;
}
@@ -114,7 +114,7 @@ abstract class type_string_common extends type_base
*/
public function get_profile_value_raw($field_value, $field_data)
{
- if (!$field_value && !$field_data['field_show_novalue'])
+ if (($field_value === null || $field_value === '') && !$field_data['field_show_novalue'])
{
return null;
}
@@ -127,12 +127,7 @@ abstract class type_string_common extends type_base
*/
public function get_profile_contact_value($field_value, $field_data)
{
- if (!$field_value && !$field_data['field_show_novalue'])
- {
- return null;
- }
-
- return $field_value;
+ return $this->get_profile_value_raw($field_value, $field_data);
}
/**