1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-27 01:40:22 +02:00

News comment fixes (missing commit)

This commit is contained in:
secretr
2009-10-09 15:08:28 +00:00
parent a8e3505b21
commit 1591ba4e42

View File

@@ -9,8 +9,8 @@
* News frontend * News frontend
* *
* $Source: /cvs_backup/e107_0.8/news.php,v $ * $Source: /cvs_backup/e107_0.8/news.php,v $
* $Revision: 1.20 $ * $Revision: 1.21 $
* $Date: 2009-09-14 18:22:15 $ * $Date: 2009-10-09 15:08:28 $
* $Author: secretr $ * $Author: secretr $
*/ */
@@ -277,6 +277,7 @@ if ($action == "extend")
$news = $sql->db_Fetch(); $news = $sql->db_Fetch();
//***NEW [SecretR] - comments handled inside now //***NEW [SecretR] - comments handled inside now
e107::setRegistry('news/page_allow_comments', !$news['news_allow_comments']);
if(!$news['news_allow_comments'] && isset($_POST['commentsubmit'])) if(!$news['news_allow_comments'] && isset($_POST['commentsubmit']))
{ {
$pid = intval(varset($_POST['pid'], 0)); // ID of the specific comment being edited (nested comments - replies) $pid = intval(varset($_POST['pid'], 0)); // ID of the specific comment being edited (nested comments - replies)
@@ -307,7 +308,7 @@ if ($action == "extend")
ob_start(); ob_start();
$ix->render_newsitem($news, 'extend', '', '', $param); $ix->render_newsitem($news, 'extend', '', '', $param);
if(!$news['news_allow_comment']) if(e107::getRegistry('news/page_allow_comments'))
{ {
global $comment_edit_query; //FIXME - kill me global $comment_edit_query; //FIXME - kill me
$comment_edit_query = 'comment.news.'.$news['news_id']; $comment_edit_query = 'comment.news.'.$news['news_id'];