/**
  * Create a new flag
  *
  * @param integer $user_id    ID of user who's flagging
  * @param integer $profile_id ID of profile being flagged
  *
  * @return boolean success flag
  */
 static function create($user_id, $profile_id)
 {
     $ufp = new User_flag_profile();
     $ufp->profile_id = $profile_id;
     $ufp->user_id = $user_id;
     $ufp->created = common_sql_now();
     if (!$ufp->insert()) {
         $msg = sprintf(_("Couldn't flag profile '%d' for review."), $profile_id);
         throw new ServerException($msg);
     }
     $ufp->free();
     return true;
 }
 /**
  * Create a new flag
  *
  * @param integer $user_id    ID of user who's flagging
  * @param integer $profile_id ID of profile being flagged
  *
  * @return boolean success flag
  */
 static function create($user_id, $profile_id)
 {
     $ufp = new User_flag_profile();
     $ufp->profile_id = $profile_id;
     $ufp->user_id = $user_id;
     $ufp->created = common_sql_now();
     if (!$ufp->insert()) {
         // TRANS: Server exception.
         $msg = sprintf(_m('Couldn\'t flag profile "%d" for review.'), $profile_id);
         throw new ServerException($msg);
     }
     $ufp->free();
     return true;
 }