summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org>2006-03-24 14:43:35 +0000
committerGerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org>2006-03-24 14:43:35 +0000
commitd8ee6e0d4ed19c41d0d059d0579e354859fcf8b4 (patch)
tree299af5a7d99b485de17137f8c36a941196dcf641 /modules
parent2d1aeff2d1c6d0538ca44a9ed3b47a5481362f67 (diff)
downloadbrdo-d8ee6e0d4ed19c41d0d059d0579e354859fcf8b4.tar.gz
brdo-d8ee6e0d4ed19c41d0d059d0579e354859fcf8b4.tar.bz2
#55040, Author block doesn't obey settings, patch by dww
Diffstat (limited to 'modules')
-rw-r--r--modules/profile.module4
-rw-r--r--modules/profile/profile.module4
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/profile.module b/modules/profile.module
index 33c22f41c..2ed1f61db 100644
--- a/modules/profile.module
+++ b/modules/profile.module
@@ -120,7 +120,7 @@ function profile_block($op = 'list', $delta = 0, $edit = array()) {
$result = db_query('SELECT name, title, type, visibility, weight FROM {profile_fields} WHERE visibility IN (%d, %d) ORDER BY weight', PROFILE_PUBLIC, PROFILE_PUBLIC_LISTINGS);
while ($record = db_fetch_object($result)) {
// Ensure that field is displayed only if it is among the defined block fields and, if it is private, the user has appropriate permissions.
- if (in_array($record->name, $use_fields)) {
+ if (isset($use_fields[$record->name]) && $use_fields[$record->name]) {
$fields[] = $record;
}
}
@@ -131,7 +131,7 @@ function profile_block($op = 'list', $delta = 0, $edit = array()) {
$output .= theme('profile_block', $account, $fields, true);
}
- if (in_array('user_profile', $use_fields)) {
+ if (isset($use_fields['user_profile']) && $use_fields['user_profile']) {
$output .= '<div>' . l(t('View full user profile'), 'user/' . $account->uid) . '</div>';
}
}
diff --git a/modules/profile/profile.module b/modules/profile/profile.module
index 33c22f41c..2ed1f61db 100644
--- a/modules/profile/profile.module
+++ b/modules/profile/profile.module
@@ -120,7 +120,7 @@ function profile_block($op = 'list', $delta = 0, $edit = array()) {
$result = db_query('SELECT name, title, type, visibility, weight FROM {profile_fields} WHERE visibility IN (%d, %d) ORDER BY weight', PROFILE_PUBLIC, PROFILE_PUBLIC_LISTINGS);
while ($record = db_fetch_object($result)) {
// Ensure that field is displayed only if it is among the defined block fields and, if it is private, the user has appropriate permissions.
- if (in_array($record->name, $use_fields)) {
+ if (isset($use_fields[$record->name]) && $use_fields[$record->name]) {
$fields[] = $record;
}
}
@@ -131,7 +131,7 @@ function profile_block($op = 'list', $delta = 0, $edit = array()) {
$output .= theme('profile_block', $account, $fields, true);
}
- if (in_array('user_profile', $use_fields)) {
+ if (isset($use_fields['user_profile']) && $use_fields['user_profile']) {
$output .= '<div>' . l(t('View full user profile'), 'user/' . $account->uid) . '</div>';
}
}