/** * create a profile_list record for a tag, tagger pair * if it doesn't exist, return it. * * @param integer $tagger the tagger * @param string $tag the tag * @param string $description description * @param boolean $private protected or not * * @return Profile_list the people tag object */ static function ensureTag($tagger, $tag, $description = null, $private = false) { $ptag = Profile_list::getByTaggerAndTag($tagger, $tag); if (empty($ptag->id)) { $args = array('tag' => $tag, 'tagger' => $tagger, 'description' => $description, 'private' => $private); $new_tag = Profile_list::saveNew($args); return $new_tag; } return $ptag; }