Example #1
0
 static function getTags($tagger, $tagged)
 {
     $tags = array();
     # XXX: store this in memcached
     $profile_tag = new Profile_tag();
     $profile_tag->tagger = $tagger;
     $profile_tag->tagged = $tagged;
     $profile_tag->find();
     while ($profile_tag->fetch()) {
         $tags[] = $profile_tag->tag;
     }
     $profile_tag->free();
     return $tags;
 }
 static function getTagsArray($tagger, $tagged, $auth_user_id = null)
 {
     $ptag = new Profile_tag();
     $ptag->tagger = $tagger;
     $ptag->tagged = $tagged;
     if ($tagger != $auth_user_id) {
         $list = new Profile_list();
         $list->private = false;
         $ptag->joinAdd($list);
         $ptag->selectAdd();
         $ptag->selectAdd('profile_tag.tag');
     }
     $tags = array();
     $ptag->find();
     while ($ptag->fetch()) {
         $tags[] = $ptag->tag;
     }
     $ptag->free();
     return $tags;
 }