Revision 594
Added by thorn almost 17 years ago
trunk/CHANGELOG | ||
---|---|---|
11 | 11 |
! = Update/Change |
12 | 12 |
|
13 | 13 |
------------------------------------- 2.7.0 ------------------------------------- |
14 |
25-Jan-2008 Thomas Hornik |
|
15 |
# module news: it was possible to post comments to postings with commenting disabled |
|
16 |
or to inactive postings. Fixed |
|
14 | 17 |
24-Jan-2008 Thomas Hornik |
15 | 18 |
! Generate filename in pages/ from page_title instead of menu_title. |
16 | 19 |
24-Jan-2008 Christian Sommer |
trunk/wb/modules/news/comment.php | ||
---|---|---|
62 | 62 |
define('SECTION_ID', $section_id); |
63 | 63 |
define('POST_ID', $post_id); |
64 | 64 |
define('POST_TITLE', $post_title); |
65 |
|
|
66 |
// don't allow commenting if its disabled, or if post or group is inactive |
|
67 |
$table_posts = TABLE_PREFIX."mod_news_posts"; |
|
68 |
$table_groups = TABLE_PREFIX."mod_news_groups"; |
|
69 |
$query = $database->query(" |
|
70 |
SELECT p.post_id |
|
71 |
FROM $table_posts AS p LEFT OUTER JOIN $table_groups AS g ON p.group_id = g.group_id |
|
72 |
WHERE p.post_id='$post_id' AND p.commenting != 'none' AND p.active = '1' AND ( g.active IS NULL OR g.active = '1' ) |
|
73 |
"); |
|
74 |
if($query->numRows() == 0) { |
|
75 |
header("Location: ".WB_URL.PAGES_DIRECTORY.""); |
|
76 |
exit(0); |
|
77 |
} |
|
78 |
|
|
65 | 79 |
// Get page details |
66 | 80 |
$query_page = $database->query("SELECT parent,page_title,menu_title,keywords,description,visibility FROM ".TABLE_PREFIX."pages WHERE page_id = '$page_id'"); |
67 | 81 |
if($query_page->numRows() == 0) { |
... | ... | |
77 | 91 |
} |
78 | 92 |
|
79 | 93 |
|
80 |
?> |
|
94 |
?> |
Also available in: Unified diff
fixed bug in news module: Dont allow comments if commenting is disabled or post or post's group is inactive