diff options
author | PayBas <contact@paybas.com> | 2014-04-05 22:32:42 +0200 |
---|---|---|
committer | Shitiz Garg <mail@dragooon.net> | 2014-06-24 21:47:29 +0530 |
commit | 4169fd65f07f67f99e64e7ab962d09c1e10f14dc (patch) | |
tree | 09c6ccaf75171067d6fbc636949dacdf89357cdb /phpBB/phpbb/profilefields | |
parent | 08e2c07f0b7991d89a562e1a78da9462d830e134 (diff) | |
download | forums-4169fd65f07f67f99e64e7ab962d09c1e10f14dc.tar forums-4169fd65f07f67f99e64e7ab962d09c1e10f14dc.tar.gz forums-4169fd65f07f67f99e64e7ab962d09c1e10f14dc.tar.bz2 forums-4169fd65f07f67f99e64e7ab962d09c1e10f14dc.tar.xz forums-4169fd65f07f67f99e64e7ab962d09c1e10f14dc.zip |
[ticket/12334] Added field_novalue fall-back as requested
PHPBB3-12334
Diffstat (limited to 'phpBB/phpbb/profilefields')
-rw-r--r-- | phpBB/phpbb/profilefields/manager.php | 5 |
1 files 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'], |