/**
  * Prepare comment data for storage in the database
  *
  * Nothing peculiar to HTML display is done at this stage. Essentially the
  * comment is stored raw, for later manipulation for the display purposes.
  *
  * @param array $vars The comment data
  * @param int   $id The post id receiving this comment
  * @param int   $replyto If supplied, the id of the comment being replied to
  */
 function prepFieldsForDB($vars, $id, $replyto = 0)
 {
     $rval['postername'] = stringHandler::clean($vars["name"]);
     if (empty($rval['postername'])) {
         $rval['postername'] = "Anonymous";
     }
     $rval['posteremail'] = $this->_db->qstr(stringHandler::clean($vars["email"]), get_magic_quotes_gpc());
     $rval['title'] = strlen($vars["title"]) > 0 ? $vars['title'] : 'Title';
     $rval['posterwebsite'] = stringHandler::transformLinks(stringHandler::clean($vars["website"]));
     $rval['commenttext'] = $this->processCommentText($vars["comment"]);
     $rval['pubemail'] = $vars["public_email"] == 1 ? 1 : 0;
     $rval['pubwebsite'] = $vars["public_website"] == 1 ? 1 : 0;
     $rval['posternotify'] = $vars["notify"] == 1 ? 1 : 0;
     $rval['posttime'] = strtotime(gmdate("M d Y H:i:s"));
     $rval['ip'] = $_SERVER['REMOTE_ADDR'];
     $rval['onhold'] = $this->needsModeration($rval['commenttext']) ? 1 : 0;
     $rval['postid'] = $id;
     $rval['parentid'] = $replyto;
     $rval['type'] = 'comment';
     return $rval;
 }