function save_configuration(&$mc)
{
    $curr['CAPTCHA_ENABLE'] = isset($_POST['enable_captcha']) ? 'true' : 'false';
    $curr['CAPTCHA_WIDTH'] = isset($_POST['captcha_width']) ? intval($_POST['captcha_width']) : 200;
    $curr['CAPTCHA_HEIGHT'] = isset($_POST['captcha_height']) ? intval($_POST['captcha_height']) : 50;
    $curr['CAPTCHA_CHARACTERS'] = isset($_POST['captcha_characters']) ? intval($_POST['captcha_characters']) : 5;
    $curr['CAPTCHA_LINES'] = isset($_POST['captcha_lines']) ? intval($_POST['captcha_lines']) : 70;
    $curr['CAPTCHA_ENABLE_SHADOWS'] = isset($_POST['captcha_enable_shadows']) ? 'true' : 'false';
    $curr['CAPTCHA_OWNER_TEXT'] = isset($_POST['captcha_owner_text']) ? 'true' : 'false';
    $curr['CAPTCHA_CHARACTER_SET'] = isset($_POST['captcha_character_set']) ? StringHandling::clean($_POST['captcha_character_set']) : '';
    $curr['CAPTCHA_CASE_INSENSITIVE'] = isset($_POST['captcha_case_insensitive']) ? 'true' : 'false';
    $curr['CAPTCHA_BACKGROUND'] = isset($_POST['captcha_background']) ? $_POST['captcha_background'] : '';
    $curr['CAPTCHA_MIN_FONT'] = isset($_POST['captcha_min_font']) ? intval($_POST['captcha_min_font']) : 16;
    $curr['CAPTCHA_MAX_FONT'] = isset($_POST['captcha_max_font']) ? intval($_POST['captcha_max_font']) : 25;
    $curr['CAPTCHA_USE_COLOR'] = isset($_POST['captcha_use_color']) ? 'true' : 'false';
    $curr['CAPTCHA_GRAPHIC_TYPE'] = isset($_POST['captcha_graphic_type']) ? $_POST['captcha_graphic_type'] : 'jpg';
    $mc->saveConfiguration($curr);
}
 /**
  * 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'] = StringHandling::removeMagicQuotes($vars["name"]);
     if (empty($rval['postername'])) {
         $rval['postername'] = "Anonymous";
     }
     $rval['posteremail'] = StringHandling::removeMagicQuotes($vars["email"]);
     $rval['title'] = StringHandling::removeMagicQuotes($vars["title"]);
     $rval['posterwebsite'] = StringHandling::removeMagicQuotes($vars["website"]);
     $rval['commenttext'] = StringHandling::clean($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'] = time();
     $rval['ip'] = $_SERVER['REMOTE_ADDR'];
     $rval['onhold'] = $this->needsModeration($rval['commenttext']) ? 1 : 0;
     $rval['postid'] = $id;
     if ($replyto > 0) {
         $rval['parentid'] = $replyto;
     }
     $rval['type'] = 'comment';
     return $rval;
 }