diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-09-06 19:05:10 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-09-06 19:05:10 +0000 |
commit | d57db29ee3d93aeacd371e0d33c0bd886baef879 (patch) | |
tree | e9129913864dfee6d82a362b339e92220e9386a3 | |
parent | d7139b85dbfce5b6e2bb5348ce8ea2f9b2964c22 (diff) | |
download | brdo-d57db29ee3d93aeacd371e0d33c0bd886baef879.tar.gz brdo-d57db29ee3d93aeacd371e0d33c0bd886baef879.tar.bz2 |
- Patch #27948 by Robert Douglas: fixed problem with author information block.
(Looks like MySQL rewrites ORto IN() internally.)
-rw-r--r-- | modules/profile.module | 2 | ||||
-rw-r--r-- | modules/profile/profile.module | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/profile.module b/modules/profile.module index b753ae387..db4c53d22 100644 --- a/modules/profile.module +++ b/modules/profile.module @@ -59,7 +59,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); + $result = db_query('SELECT name, title, type, visibility FROM {profile_fields} WHERE visibility IN (%d, %d) ORDER BY weight', PROFILE_PUBLIC, PROFILE_PUBLIC_LISTINGS); 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)) { diff --git a/modules/profile/profile.module b/modules/profile/profile.module index b753ae387..db4c53d22 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -59,7 +59,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); + $result = db_query('SELECT name, title, type, visibility FROM {profile_fields} WHERE visibility IN (%d, %d) ORDER BY weight', PROFILE_PUBLIC, PROFILE_PUBLIC_LISTINGS); 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)) { |