45d44 < 97d95 < 416c414 < if($home && $sectionid == false) $where .= " AND hidefromhome='0' "; --- > if($home) $where .= " AND hidefromhome='0' "; 695a694,695 > > 864c864,866 < } else { --- > } else { > > 910c912,913 < } --- > } > 913,922c916,917 < $captchaPassed = true; < if (md5($_POST['verification']) != $_SESSION['image_random_value']) { < # In this case, we did not match the captcha so we should not post the comment < # $this->standalone_message("Spam prevention", "There was an error verifying the characters from the image and the characters you typed in. Please try again."); < $captchaPassed = false; < } < if ($captchaPassed == true) { < if ($replyto > 0 && is_numeric($replyto)) < $parentidq = " parentid='$replyto', "; < $q = "insert into ".T_COMMENTS." --- > if($replyto > 0 && is_numeric($replyto)) $parentidq = " parentid='$replyto', "; > $q = "insert into ".T_COMMENTS." 937,957c932,953 < $this->query($q); < $insid = $this->insert_id; < if($insid < 1) { < $this->standalone_message("Error", "Error inserting comment : ".mysql_error()); < } else { < // notify < include_once(BBLOGROOT."inc/mail.php"); < $message = htmlspecialchars($postername)." has posted a comment in reply to your blog entry at ".$this->_get_entry_permalink($postid)."\n"; < if($onhold == 1) $message .= "You have selected comment moderation and this comment will not appear until you approve it, so please visit your blog and log in to approve or reject any comments\n"; < notify_owner("New comment on your blog",$message); < $newnumcomments = $this->get_var("SELECT count(*) as c FROM ".T_COMMENTS." WHERE postid='$postid' and deleted='false' group by postid"); < $this->query("update ".T_POSTS." set commentcount='$newnumcomments' where postid='$postid'"); < $this->modifiednow(); < < // This is used when an alternate location is desired as the result of a successful post. < if(isset($_POST['return_url'])) { < $ru = str_replace('%commentid%',$insid,$_POST['return_url']); < header("Location: ".$ru); < } else { < header("Location: ".$this->_get_entry_permalink($postid)."#comment".$insid); < } --- > $this->query($q); > $insid = $this->insert_id; > if($insid < 1) { > $this->standalone_message("Error", "Error inserting comment : ".mysql_error()); > } else { > // notify > include_once(BBLOGROOT."inc/mail.php"); > $message = htmlspecialchars($postername)." has posted a comment in reply to your blog entry at ".$this->_get_entry_permalink($postid)."\n"; > if($onhold == 1) $message .= "You have selected comment moderation and this comment will not appear until you approve it, so please visit your blog and log in to approve or reject any comments\n"; > notify_owner("New comment on your blog",$message); > > $newnumcomments = $this->get_var("SELECT count(*) as c FROM ".T_COMMENTS." WHERE postid='$postid' and deleted='false' group by postid"); > $this->query("update ".T_POSTS." set commentcount='$newnumcomments' where postid='$postid'"); > $this->modifiednow(); > > // This is used when an alternate location is desired as the result of a successful post. > if(isset($_POST['return_url'])) { > $ru = str_replace('%commentid%',$insid,$_POST['return_url']); > header("Location: ".$ru); > } else { > header("Location: ".$this->_get_entry_permalink($postid)."#comment".$insid); > } 960,970d955 < } < } else { < // We failed on the captcha! < // Assign the values that were passed to us < $this->assign('commentFieldError', "The image verification match failed. Please try again."); < $this->assign('commentFieldPosterName', $_POST["name"]); < if($postername == '') $postername = "Anonymous"; < $this->assign('commentFieldPosterEmail', $_POST["email"]); < $this->assign('commentreplytitle', $_POST["title"]); < $this->assign('commentFieldPosterWebsite', $_POST["website"]); < $this->assign('commentFieldPosterComment', $_POST["comment"]); 972c957,958 < } --- > } >