- # 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 ' .
- $lim, $tag));
-
- $pl = new ProfileList($profile);
- $cnt = $pl->show_list();
-
- common_pagination($page > 1,
+ // XXX: memcached this
+
+ $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%s';
+
+ $profile->query(sprintf($qry, $this->tag, $lim));
+
+ $ptl = new PeopleTagList($profile, $this); // pass the ammunition
+ $cnt = $ptl->show();
+
+ $this->pagination($this->page > 1,