Changeset 1355 for trunk/wp-comments-post.php
- Timestamp:
- 05/24/2004 08:22:18 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-comments-post.php
r1237 r1355 33 33 $user_ip = $_SERVER['REMOTE_ADDR']; 34 34 35 if ( 'closed' == $wpdb->get_var("SELECT comment_status FROM $ tableposts WHERE ID = '$comment_post_ID'") )35 if ( 'closed' == $wpdb->get_var("SELECT comment_status FROM $wpdb->posts WHERE ID = '$comment_post_ID'") ) 36 36 die( __('Sorry, comments are closed for this item.') ); 37 37 … … 52 52 53 53 // Simple flood-protection 54 $lasttime = $wpdb->get_var("SELECT comment_date FROM $ tablecomments WHERE comment_author_IP = '$user_ip' ORDER BY comment_date DESC LIMIT 1");54 $lasttime = $wpdb->get_var("SELECT comment_date FROM $wpdb->comments WHERE comment_author_IP = '$user_ip' ORDER BY comment_date DESC LIMIT 1"); 55 55 if (!empty($lasttime)) { 56 56 $time_lastcomment= mysql2date('U', $lasttime); … … 69 69 } 70 70 71 $wpdb->query("INSERT INTO $ tablecomments71 $wpdb->query("INSERT INTO $wpdb->comments 72 72 (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_date_gmt, comment_content, comment_approved) 73 73 VALUES
Note: See TracChangeset
for help on using the changeset viewer.