diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-11-07 09:22:04 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-11-07 09:22:04 +0000 |
| commit | 2deb7ed927ba4f38c7920e1d0fb82a85edc031fd (patch) | |
| tree | 6e3f9b353a79a10e67602b88be98a274bcc8dfe0 /wp-inst/wp-comments-post.php | |
| parent | 99532e55fc2d3de5c265bc36976664d1eedbe2ea (diff) | |
Massive WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@417 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-comments-post.php')
| -rw-r--r-- | wp-inst/wp-comments-post.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/wp-inst/wp-comments-post.php b/wp-inst/wp-comments-post.php index 3440ae8..5b1c0a2 100644 --- a/wp-inst/wp-comments-post.php +++ b/wp-inst/wp-comments-post.php @@ -1,6 +1,8 @@ <?php require( dirname(__FILE__) . '/wp-config.php' ); +nocache_headers(); + $comment_post_ID = (int) $_POST['comment_post_ID']; $status = $wpdb->get_row("SELECT post_status, comment_status FROM $wpdb->posts WHERE ID = '$comment_post_ID'"); @@ -46,7 +48,7 @@ if ( '' == $comment_content ) $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'user_ID'); -wp_new_comment($commentdata); +wp_new_comment( $commentdata ); if ( !$user_ID ) : setcookie('comment_author_' . COOKIEHASH, stripslashes($comment_author), time() + 30000000, COOKIEPATH, COOKIE_DOMAIN); @@ -54,9 +56,8 @@ if ( !$user_ID ) : setcookie('comment_author_url_' . COOKIEHASH, stripslashes($comment_author_url), time() + 30000000, COOKIEPATH, COOKIE_DOMAIN); endif; -nocache_headers(); +$location = ( empty( $_POST['redirect_to'] ) ) ? get_permalink( $comment_post_ID ) : $_POST['redirect_to']; -$location = (empty($_POST['redirect_to'])) ? $_SERVER["HTTP_REFERER"] : $_POST['redirect_to']; +wp_redirect( $location ); -wp_redirect($location); ?> |
