From: Zach Copley Date: Sun, 25 Jan 2009 10:03:49 +0000 (-0800) Subject: Fixed broken SQL for people tags view X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=688d38b1015456ae28cf0ef96bab777a47d5a97a;p=quix0rs-gnu-social.git Fixed broken SQL for people tags view --- diff --git a/actions/peopletag.php b/actions/peopletag.php index bf2aacb1c2..3578c53fdf 100644 --- a/actions/peopletag.php +++ b/actions/peopletag.php @@ -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,