Index: trunk/CHANGELOG
===================================================================
--- trunk/CHANGELOG	(revision 572)
+++ trunk/CHANGELOG	(revision 573)
@@ -11,7 +11,9 @@
 ! = Update/Change
 
 ------------------------------------- 2.7.0 -------------------------------------
-
+
+20-Jan-2008 Thomas Hornik
+#	fixed E_NOTICE-warning in news-module (about SECTION_ID in comment.php)
 19-Jan-2008 Christian Sommer
 !	Reduced the success time out and set WYSIWSY background to white
 #	Fixed some errors in form module (only in conjunction with E_ALL)
Index: trunk/wb/modules/news/view.php
===================================================================
--- trunk/wb/modules/news/view.php	(revision 572)
+++ trunk/wb/modules/news/view.php	(revision 573)
@@ -301,7 +301,7 @@
 	if($post['commenting'] == 'private' AND isset($admin) AND $admin->is_authenticated() == true OR $post['commenting'] == 'public') {
 		
 		// Print comments header
-		echo str_replace('[ADD_COMMENT_URL]', WB_URL.'/modules/news/comment.php?id='.POST_ID, $setting_comments_header);
+		echo str_replace('[ADD_COMMENT_URL]', WB_URL.'/modules/news/comment.php?id='.POST_ID.'&sid='.$section_id, $setting_comments_header);
 		
 		// Query for comments
 		$query_comments = $database->query("SELECT title,comment,commented_when,commented_by FROM ".TABLE_PREFIX."mod_news_comments WHERE post_id = '".POST_ID."' ORDER BY commented_when ASC");
@@ -332,7 +332,7 @@
 		}
 		
 		// Print comments footer
-		echo str_replace('[ADD_COMMENT_URL]', WB_URL.'/modules/news/comment.php?id='.POST_ID, $setting_comments_footer);
+		echo str_replace('[ADD_COMMENT_URL]', WB_URL.'/modules/news/comment.php?id='.POST_ID.'&sid='.$section_id, $setting_comments_footer);
 		
 	}
 		
Index: trunk/wb/modules/news/comment.php
===================================================================
--- trunk/wb/modules/news/comment.php	(revision 572)
+++ trunk/wb/modules/news/comment.php	(revision 573)
@@ -28,21 +28,18 @@
 
 // Check if there is a post id
 if(!isset($_GET['id']) OR !is_numeric($_GET['id'])) {
-	if(!isset($_POST['post_id']) OR !is_numeric($_POST['post_id'])) {
-		header("Location: ".WB_URL.PAGES_DIRECTORY."");
-		exit(0);
-	} else {
-		$post_id = $_POST['post_id'];
-	}
-} else {
-	$post_id = $_GET['id'];
+	header("Location: ".WB_URL.PAGES_DIRECTORY."");
+	exit(0);
 }
+$post_id = $_GET['id'];
+$section_id = $_GET['sid'];
 
+
 // Include database class
 require_once(WB_PATH.'/framework/class.database.php');
 $database = new database();
 
-$query_settings = $database->query("SELECT use_captcha FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '".SECTION_ID."'");
+$query_settings = $database->query("SELECT use_captcha FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
 $use_captcha = $query_settings->fetchRow();
 if($use_captcha['use_captcha']) {
 	$_SESSION['captcha'] = '';
