mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-01 19:24:34 +00:00
Missing querycount
git-svn-id: https://develop.svn.wordpress.org/trunk@558 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user