Skip to content
Snippets Groups Projects
Commit d25fa75e authored by Gerhard Killesreiter's avatar Gerhard Killesreiter
Browse files

#55788, author block configure page should only show public fields, patch by dww

parent 0ed9f460
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -92,7 +92,7 @@ function profile_block($op = 'list', $delta = 0, $edit = array()) { ...@@ -92,7 +92,7 @@ function profile_block($op = 'list', $delta = 0, $edit = array()) {
else if ($op == 'configure' && $delta == 0) { else if ($op == 'configure' && $delta == 0) {
// Compile a list of fields to show // Compile a list of fields to show
$fields = array(); $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)) { while ($record = db_fetch_object($result)) {
$fields[$record->name] = $record->title; $fields[$record->name] = $record->title;
} }
......
...@@ -92,7 +92,7 @@ function profile_block($op = 'list', $delta = 0, $edit = array()) { ...@@ -92,7 +92,7 @@ function profile_block($op = 'list', $delta = 0, $edit = array()) {
else if ($op == 'configure' && $delta == 0) { else if ($op == 'configure' && $delta == 0) {
// Compile a list of fields to show // Compile a list of fields to show
$fields = array(); $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)) { while ($record = db_fetch_object($result)) {
$fields[$record->name] = $record->title; $fields[$record->name] = $record->title;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment