]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fixed broken SQL for people tags view
authorZach Copley <zach@controlyourself.ca>
Sun, 25 Jan 2009 10:03:49 +0000 (02:03 -0800)
committerZach Copley <zach@controlyourself.ca>
Sun, 25 Jan 2009 10:03:49 +0000 (02:03 -0800)
actions/peopletag.php

index bf2aacb1c27524ed61e38360b96c779eebed691c..3578c53fdf0d8d7f473b79ab382ba5253768d90e 100644 (file)
@@ -49,7 +49,6 @@ class PeopletagAction extends Action
         $this->showPage();
     }
     
-  
     function showContent()
     {
         
@@ -66,17 +65,18 @@ class PeopletagAction extends Action
 
         # XXX: memcached this
         
-        $profile->query(sprintf('SELECT profile.* ' .
-                                'FROM profile JOIN profile_tag ' .
-                                'ON profile.id = profile_tag.tagger ' .
-                                'WHERE profile_tag.tagger = profile_tag.tagged ' .
-                                'AND tag = "%s" ' .
-                                'ORDER BY profile_tag.modified DESC ',
-                                'LIMIT 0, %s'), $this->tag, $lim);
+        $qry =  'SELECT profile.* ' .
+                'FROM profile JOIN profile_tag ' .
+                'ON profile.id = profile_tag.tagger ' .
+                'WHERE profile_tag.tagger = profile_tag.tagged ' .
+                'AND tag = "%s" ' .
+                'ORDER BY profile_tag.modified DESC';
+        
+        $profile->query(sprintf($qry, $this->tag, $lim));
 
         $pl = new ProfileList($profile, null, $this);
         $cnt = $pl->show();
-        
+                
         $this->pagination($this->page > 1,
                           $cnt > PROFILES_PER_PAGE,
                           $this->page,