Query errors in Profile_tag

This commit is contained in:
Evan Prodromou 2011-09-27 11:32:05 -04:00
parent 8b35e69b34
commit 5ccae1313c

View File

@ -100,13 +100,13 @@ class Profile_tag extends Managed_DataObject
{ {
$ptag = new Profile_tag(); $ptag = new Profile_tag();
$qry = sprint('select profile_tag.tag '. $qry = sprintf('select profile_tag.tag '.
'from profile_tag join profile_list '. 'from profile_tag join profile_list '.
' on (profile_tag.tagger = profile_list.tagger ' . ' on (profile_tag.tagger = profile_list.tagger ' .
' and profile_tag.tag = profile_list.tag) ' . ' and profile_tag.tag = profile_list.tag) ' .
'where profile_tag.tagger = %d ' . 'where profile_tag.tagger = %d ' .
'and profile_tag.tagged = %d ', 'and profile_tag.tagged = %d ',
$tagger, $tagged); $tagger, $tagged);
if ($auth_user_id != $tagger) { if ($auth_user_id != $tagger) {
$qry .= 'and profile_list.private = 0'; $qry .= 'and profile_list.private = 0';
@ -114,7 +114,7 @@ class Profile_tag extends Managed_DataObject
$tags = array(); $tags = array();
$ptag->query($sql); $ptag->query($qry);
while ($ptag->fetch()) { while ($ptag->fetch()) {
$tags[] = $ptag->tag; $tags[] = $ptag->tag;