Commit 0fb6af11 authored by Dries's avatar Dries
Browse files

- Fixed broken query

parent b42e2b67
......@@ -60,7 +60,7 @@ function profile_block($op = 'list', $delta = 0, $edit = array()) {
if ($use_fields = variable_get('profile_block_author_fields', array())) {
// Compile a list of fields to show
$fields = array();
$result = db_query('SELECT name, title, type, visibility FROM {profile_fields} WHERE visibility == %d ORDER BY weight', PROFILE_PUBLIC, PROFILE_PUBLIC_LISTING);
$result = db_query('SELECT name, title, type, visibility FROM {profile_fields} WHERE visibility = %d ORDER BY weight', PROFILE_PUBLIC, PROFILE_PUBLIC_LISTING);
while ($record = db_fetch_object($result)) {
// Endure 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)) {
......
......@@ -60,7 +60,7 @@ function profile_block($op = 'list', $delta = 0, $edit = array()) {
if ($use_fields = variable_get('profile_block_author_fields', array())) {
// Compile a list of fields to show
$fields = array();
$result = db_query('SELECT name, title, type, visibility FROM {profile_fields} WHERE visibility == %d ORDER BY weight', PROFILE_PUBLIC, PROFILE_PUBLIC_LISTING);
$result = db_query('SELECT name, title, type, visibility FROM {profile_fields} WHERE visibility = %d ORDER BY weight', PROFILE_PUBLIC, PROFILE_PUBLIC_LISTING);
while ($record = db_fetch_object($result)) {
// Endure 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)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment