Project

General

Profile

« Previous | Next » 

Revision 573

Added by thorn almost 17 years ago

fixed E_NOTICE-warning in news-module (SECTION_ID)

View differences:

comment.php
28 28

  
29 29
// Check if there is a post id
30 30
if(!isset($_GET['id']) OR !is_numeric($_GET['id'])) {
31
	if(!isset($_POST['post_id']) OR !is_numeric($_POST['post_id'])) {
32
		header("Location: ".WB_URL.PAGES_DIRECTORY."");
33
		exit(0);
34
	} else {
35
		$post_id = $_POST['post_id'];
36
	}
37
} else {
38
	$post_id = $_GET['id'];
31
	header("Location: ".WB_URL.PAGES_DIRECTORY."");
32
	exit(0);
39 33
}
34
$post_id = $_GET['id'];
35
$section_id = $_GET['sid'];
40 36

  
37

  
41 38
// Include database class
42 39
require_once(WB_PATH.'/framework/class.database.php');
43 40
$database = new database();
44 41

  
45
$query_settings = $database->query("SELECT use_captcha FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '".SECTION_ID."'");
42
$query_settings = $database->query("SELECT use_captcha FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
46 43
$use_captcha = $query_settings->fetchRow();
47 44
if($use_captcha['use_captcha']) {
48 45
	$_SESSION['captcha'] = '';

Also available in: Unified diff