mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Check for comment status.
git-svn-id: http://svn.automattic.com/wordpress/trunk@159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d9ef79d24d
commit
8f107092d9
@ -34,6 +34,11 @@ $original_comment = $comment;
|
|||||||
$comment_autobr = $HTTP_POST_VARS["comment_autobr"];
|
$comment_autobr = $HTTP_POST_VARS["comment_autobr"];
|
||||||
$comment_post_ID = $HTTP_POST_VARS["comment_post_ID"];
|
$comment_post_ID = $HTTP_POST_VARS["comment_post_ID"];
|
||||||
|
|
||||||
|
$commentstatus = $wpdb->get_var("SELECT comment_status FROM $tableposts WHERE ID = $comment_post_ID");
|
||||||
|
|
||||||
|
if ('closed' == $commentstatus)
|
||||||
|
die('Sorry, comments are closed for this item.');
|
||||||
|
|
||||||
if ($require_name_email && ($email == "" || $email == "@" || $author == "" || $author == "name")) { //original fix by Dodo, and then Drinyth
|
if ($require_name_email && ($email == "" || $email == "@" || $author == "" || $author == "name")) { //original fix by Dodo, and then Drinyth
|
||||||
echo "Error: please fill the required fields (name, email)";
|
echo "Error: please fill the required fields (name, email)";
|
||||||
exit;
|
exit;
|
||||||
@ -82,6 +87,8 @@ if (!empty($lasttime)) {
|
|||||||
}
|
}
|
||||||
/* end flood-protection */
|
/* end flood-protection */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($ok) {
|
if ($ok) {
|
||||||
|
|
||||||
$wpdb->query("INSERT INTO $tablecomments VALUES ('0','$comment_post_ID','$author','$email','$url','$user_ip','$now','$comment','0')");
|
$wpdb->query("INSERT INTO $tablecomments VALUES ('0','$comment_post_ID','$author','$email','$url','$user_ip','$now','$comment','0')");
|
||||||
|
Loading…
Reference in New Issue
Block a user