From 4cd9ea1d27fd60ef56e2995549028345e92132fe Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 10 Mar 2005 07:01:42 +0000 Subject: [PATCH] Fix comments popup window reload upon post. http://mosquito.wordpress.org/view.php?id=897 git-svn-id: http://svn.automattic.com/wordpress/trunk@2427 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-comments-post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-comments-post.php b/wp-comments-post.php index 5c5faa568..3bebc15b6 100644 --- a/wp-comments-post.php +++ b/wp-comments-post.php @@ -50,7 +50,7 @@ header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Cache-Control: no-cache, must-revalidate, max-age=0'); header('Pragma: no-cache'); -$location = get_permalink($comment_post_ID); +$location = (empty($_POST['redirect_to'])) ? $_SERVER["HTTP_REFERER"] : $_POST['redirect_to']; header("Location: $location");