[drupal-devel] [bug] Author Information block has a bad query

nedjo drupal-devel at drupal.org
Thu Jul 14 02:36:37 UTC 2005


Issue status update for 
http://drupal.org/node/23810
Post a follow up: 
http://drupal.org/project/comments/add/23810

 Project:      Drupal
 Version:      cvs
 Component:    profile.module
 Category:     bug reports
 Priority:     normal
 Assigned to:  Robin Monks
 Reported by:  samo
 Updated by:   nedjo
 Status:       patch
 Attachment:   http://drupal.org/files/issues/profile_view_query_1.patch (1.31 KB)

Thanks for catching these issues (they're from my previous patch). 
There should be a space after the comma (PROFILE_PUBLIC,
PROFILE_PUBLIC_LISTINGS), which I've added to the patch.




nedjo



Previous comments:
------------------------------------------------------------------------

May 28, 2005 - 12:41 : samo

line 63 seems wrong:


$result = db_query('SELECT name, title, type, visibility FROM
{profile_fields} WHERE visibility = %d ORDER BY weight',
PROFILE_PUBLIC, PROFILE_PUBLIC_LISTING);


PROFILE PUBLIC_LISTING should have an "S" at the end; also there is
only one variable substitution in the above query.  I believe it should
be:


$result = db_query('SELECT name, title, type, visibility FROM
{profile_fields} WHERE visibility = %d OR visibility = %d ORDER BY
weight', PROFILE_PUBLIC,PROFILE_PUBLIC_LISTINGS);




------------------------------------------------------------------------

July 7, 2005 - 10:35 : samo

this is still active in HEAD and is a very easy fix.  


anyone?




------------------------------------------------------------------------

July 13, 2005 - 09:10 : Robin Monks

Attachment: http://drupal.org/files/issues/profile_view_query.patch (1.11 KB)

Corrects issue.


Tested to WORK on HEAD.


Robin




------------------------------------------------------------------------

July 13, 2005 - 09:17 : Robin Monks

Attachment: http://drupal.org/files/issues/profile_view_query_0.patch (1.31 KB)

Also fixes someone else spelling mistake futher down (thanks to
Malthus	for noticing this).


Robin







More information about the drupal-devel mailing list