Index: trunk/wb/modules/news/comment.php
===================================================================
--- trunk/wb/modules/news/comment.php	(revision 374)
+++ trunk/wb/modules/news/comment.php	(revision 375)
@@ -42,6 +42,15 @@
 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."'");
+$use_captcha=$query_settings['use_captcha'];
+if($use_captcha) {
+	$_SESSION['captcha'] = '';
+	for($i = 0; $i < 5; $i++) {
+		$_SESSION['captcha'] .= rand(0,9);
+	}
+}
+
 // Query post for page id
 $query_post = $database->query("SELECT post_id,title,section_id,page_id FROM ".TABLE_PREFIX."mod_news_posts WHERE post_id = '$post_id'");
 if($query_post->numRows() == 0) {
Index: trunk/wb/modules/news/submit_comment.php
===================================================================
--- trunk/wb/modules/news/submit_comment.php	(revision 374)
+++ trunk/wb/modules/news/submit_comment.php	(revision 375)
@@ -33,7 +33,7 @@
 if(is_numeric($_GET['page_id']) AND is_numeric($_GET['section_id']) AND isset($_GET['post_id']) AND is_numeric($_GET['post_id']) AND isset($_POST['comment']) AND $_POST['comment'] != '') {
 	
 	// Check captcha
-	$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 = '".$_GET['section_id']."'");
 	if($query_settings->numRows() == 0) { 
 		exit(header('Location: '.WB_URL.'/pages/'));
 	} else {
@@ -75,7 +75,7 @@
 	$page = $query_page->fetchRow();
 	header('Location: '.$wb->page_link($page['link']).'?id='.$post_id);
 } else {
-	header('Location: '.WB_URL.'/pages/');
+	header('Location: '.WB_URL.'/modules/news/comment.php?id='.$_GET['post_id']);
 }
 
 ?>
\ No newline at end of file
