From d25fa75e2bf6d874b195103e30feb4fcdd3bd82a Mon Sep 17 00:00:00 2001 From: Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> Date: Sat, 25 Mar 2006 11:07:54 +0000 Subject: [PATCH] #55788, author block configure page should only show public fields, patch by dww --- modules/profile.module | 2 +- modules/profile/profile.module | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/profile.module b/modules/profile.module index 2ed1f61db3fa..1e4845dff11a 100644 --- a/modules/profile.module +++ b/modules/profile.module @@ -92,7 +92,7 @@ function profile_block($op = 'list', $delta = 0, $edit = array()) { else if ($op == 'configure' && $delta == 0) { // Compile a list of fields to show $fields = array(); - $result = db_query('SELECT name, title, weight FROM {profile_fields} ORDER BY weight'); + $result = db_query('SELECT name, title, weight, visibility FROM {profile_fields} WHERE visibility IN (%d, %d) ORDER BY weight', PROFILE_PUBLIC, PROFILE_PUBLIC_LISTINGS); while ($record = db_fetch_object($result)) { $fields[$record->name] = $record->title; } diff --git a/modules/profile/profile.module b/modules/profile/profile.module index 2ed1f61db3fa..1e4845dff11a 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -92,7 +92,7 @@ function profile_block($op = 'list', $delta = 0, $edit = array()) { else if ($op == 'configure' && $delta == 0) { // Compile a list of fields to show $fields = array(); - $result = db_query('SELECT name, title, weight FROM {profile_fields} ORDER BY weight'); + $result = db_query('SELECT name, title, weight, visibility FROM {profile_fields} WHERE visibility IN (%d, %d) ORDER BY weight', PROFILE_PUBLIC, PROFILE_PUBLIC_LISTINGS); while ($record = db_fetch_object($result)) { $fields[$record->name] = $record->title; } -- GitLab