From f2b6a114995e6e8b6525ab2a3b8cf330efbb7d62 Mon Sep 17 00:00:00 2001 From: real_nowhereman Date: Tue, 19 Feb 2008 21:17:30 +0000 Subject: [PATCH] now the redirect bug should be *really* fixed --- comments.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/comments.php b/comments.php index 8450ad0..0dfdf68 100644 --- a/comments.php +++ b/comments.php @@ -155,6 +155,9 @@ do_action('comment_post', $_GET['entry'], array($id, $arr)); + $q =& new FPDB_Query(array('id'=>$_GET['entry'],'fullparse'=>false), null); + list($entryid, $e) = $q->getEntry(); + if ($fp_config['general']['notify'] && !user_loggedin()) { @@ -162,9 +165,7 @@ $comm_mail = isset($arr['email'])? "<{$arr['email']}>" : ''; $from_mail = $comm_mail? $arr['email'] : $fp_config['general']['email']; - $q =& new FPDB_Query(array('entry'=>$_GET['entry'],'fullparse'=>false), null); - list($entryid, $e) = $q->getEntry(); - + $post = $e; // plugin such as prettyurls might need this... $lang = lang_load('comments'); @@ -202,11 +203,8 @@ // if comment is valid, this redirect will clean the postdata $location = str_replace( '&', '&', - apply_filters( - 'comments_link', - '', - $entryid) - ) . '#'.$id; + get_comments_link($entryid) + ) . '#'.$id; utils_redirect($location,true); exit();