Removed $querycount. Added $wpdb->querycount

git-svn-id: https://develop.svn.wordpress.org/trunk@569 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mike Little
2003-12-05 01:24:02 +00:00
parent dc23e01477
commit f2aa5da5b0
11 changed files with 2 additions and 17 deletions
-3
View File
@@ -39,7 +39,6 @@ $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,7 +67,6 @@ $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);
@@ -101,7 +99,6 @@ 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);