From e1eb496fac9b03282f2a7b9347c9e4bf560fe258 Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@2427 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 5c5faa5683..3bebc15b67 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");