Missing querycount

git-svn-id: https://develop.svn.wordpress.org/trunk@558 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mike Little
2003-11-25 00:46:52 +00:00
parent 6c8852bc51
commit 4efb6bb23a
27 changed files with 95 additions and 31 deletions

View File

@@ -39,7 +39,7 @@ $user_ip = $HTTP_SERVER_VARS['REMOTE_ADDR'];
$user_domain = gethostbyaddr($user_ip);
$commentstatus = $wpdb->get_var("SELECT comment_status FROM $tableposts WHERE ID = $comment_post_ID");
++$querycount;
if ('closed' == $commentstatus)
die('Sorry, comments are closed for this item.');
@@ -68,6 +68,7 @@ $url = addslashes($url);
/* Flood-protection */
$lasttime = $wpdb->get_var("SELECT comment_date FROM $tablecomments WHERE comment_author_IP = '$user_ip' ORDER BY comment_date DESC LIMIT 1");
++$querycount;
$ok = true;
if (!empty($lasttime)) {
$time_lastcomment= mysql2date('U', $lasttime);
@@ -100,6 +101,7 @@ if ($ok) { // if there was no comment from this IP in the last 10 seconds
");
$comment_ID = $wpdb->get_var('SELECT last_insert_id()');
++$querycount;
if (($moderation_notify) && (!$approved)) {
wp_notify_moderator($comment_ID);