Removed $querycount. Added $wpdb->querycount

git-svn-id: http://svn.automattic.com/wordpress/trunk@569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
mikelittle
2003-12-05 01:24:02 +00:00
parent 280324268f
commit ed973decee
11 changed files with 2 additions and 17 deletions

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);