Revision 375
Added by Matthias almost 18 years ago
comment.php | ||
---|---|---|
42 | 42 |
require_once(WB_PATH.'/framework/class.database.php'); |
43 | 43 |
$database = new database(); |
44 | 44 |
|
45 |
$query_settings = $database->query("SELECT use_captcha FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '".SECTION_ID."'"); |
|
46 |
$use_captcha=$query_settings['use_captcha']; |
|
47 |
if($use_captcha) { |
|
48 |
$_SESSION['captcha'] = ''; |
|
49 |
for($i = 0; $i < 5; $i++) { |
|
50 |
$_SESSION['captcha'] .= rand(0,9); |
|
51 |
} |
|
52 |
} |
|
53 |
|
|
45 | 54 |
// Query post for page id |
46 | 55 |
$query_post = $database->query("SELECT post_id,title,section_id,page_id FROM ".TABLE_PREFIX."mod_news_posts WHERE post_id = '$post_id'"); |
47 | 56 |
if($query_post->numRows() == 0) { |
Also available in: Unified diff
Fixed Captcha didn't work in news comments (#337)