aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
authorHenry Sudhof <kellanved@phpbb.com>2009-08-03 15:46:56 +0000
committerHenry Sudhof <kellanved@phpbb.com>2009-08-03 15:46:56 +0000
commit1f871950d8bbefe59e18c00ea3238591c0b73807 (patch)
treec6b5d1127658d68ebed7fa17183c2795a13d40c8 /phpBB/viewtopic.php
parentd376811e7faf1f947645c9bfedd235c6ae9e3227 (diff)
downloadforums-1f871950d8bbefe59e18c00ea3238591c0b73807.tar
forums-1f871950d8bbefe59e18c00ea3238591c0b73807.tar.gz
forums-1f871950d8bbefe59e18c00ea3238591c0b73807.tar.bz2
forums-1f871950d8bbefe59e18c00ea3238591c0b73807.tar.xz
forums-1f871950d8bbefe59e18c00ea3238591c0b73807.zip
#48985
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9916 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 52bae414df..fc96f0c901 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -1179,7 +1179,22 @@ if ($config['load_cpf_viewtopic'])
$cp = new custom_profile();
// Grab all profile fields from users in id cache for later use - similar to the poster cache
- $profile_fields_cache = $cp->generate_profile_fields_template('grab', $id_cache);
+ $profile_fields_tmp = $cp->generate_profile_fields_template('grab', $id_cache);
+
+ // filter out fields not to be displayed on viewtopic. Yes, it's a hack, but this shouldn't break any MODs.
+ $profile_fields_cache = array();
+ foreach ($profile_fields_tmp as $profile_user_id => $profile_fields)
+ {
+ $profile_fields_cache[$profile_user_id] = array();
+ foreach ($profile_fields as $used_ident => $profile_field)
+ {
+ if ($profile_field['data']['field_show_on_vt'])
+ {
+ $profile_fields_cache[$profile_user_id][$used_ident] = $profile_field;
+ }
+ }
+ }
+ unset($profile_fields_tmp);
}
// Generate online information for user