From 4169fd65f07f67f99e64e7ab962d09c1e10f14dc Mon Sep 17 00:00:00 2001 From: PayBas <contact@paybas.com> Date: Sat, 5 Apr 2014 22:32:42 +0200 Subject: [PATCH] [ticket/12334] Added field_novalue fall-back as requested PHPBB3-12334 --- phpBB/phpbb/profilefields/manager.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/profilefields/manager.php b/phpBB/phpbb/profilefields/manager.php index f075e38ded..7602abf9aa 100644 --- a/phpBB/phpbb/profilefields/manager.php +++ b/phpBB/phpbb/profilefields/manager.php @@ -389,6 +389,7 @@ class manager { $profile_field = $this->type_collection[$ident_ary['data']['field_type']]; $value = $profile_field->get_profile_value($ident_ary['value'], $ident_ary['data']); + $valueid = (!$ident_ary['value'] && !$ident_ary['data']['field_show_novalue']) ? $ident_ary['data']['field_novalue'] : $ident_ary['value']; if ($value === null) { @@ -414,7 +415,7 @@ class manager $tpl_fields['row'] += array( 'PROFILE_' . strtoupper($ident) . '_IDENT' => $ident, 'PROFILE_' . strtoupper($ident) . '_VALUE' => $value, - 'PROFILE_' . strtoupper($ident) . '_VALUEID' => $ident_ary['value'], + 'PROFILE_' . strtoupper($ident) . '_VALUEID' => $valueid, 'PROFILE_' . strtoupper($ident) . '_CONTACT' => $contact_url, 'PROFILE_' . strtoupper($ident) . '_DESC' => $field_desc, 'PROFILE_' . strtoupper($ident) . '_TYPE' => $ident_ary['data']['field_type'], @@ -428,7 +429,7 @@ class manager $tpl_fields['blockrow'][] = array( 'PROFILE_FIELD_IDENT' => $ident, 'PROFILE_FIELD_VALUE' => $value, - 'PROFILE_FIELD_VALUEID' => $ident_ary['value'], + 'PROFILE_FIELD_VALUEID' => $valueid, 'PROFILE_FIELD_CONTACT' => $contact_url, 'PROFILE_FIELD_DESC' => $field_desc, 'PROFILE_FIELD_TYPE' => $ident_ary['data']['field_type'],