Revision 1457
Added by Dietmar almost 13 years ago
delete_comment.php | ||
---|---|---|
18 | 18 |
|
19 | 19 |
require('../../config.php'); |
20 | 20 |
|
21 |
$admin_header = true; |
|
22 |
// Tells script to update when this page was last updated |
|
23 |
$update_when_modified = true; |
|
21 | 24 |
// Include WB admin wrapper script |
22 |
$update_when_modified = true; // Tells script to update when this page was last updated |
|
23 | 25 |
require(WB_PATH.'/modules/admin.php'); |
24 | 26 |
|
25 |
$cid = $admin->checkIDKEY('comment_id', false, 'GET');
|
|
26 |
$pid = $admin->checkIDKEY('post_id', false, 'GET');
|
|
27 |
if (!$pid || !$cid) {
|
|
27 |
$comment_id = intval($admin->checkIDKEY('comment_id', false, 'GET'));
|
|
28 |
$post_id = intval($admin->checkIDKEY('post_id', false, 'GET'));
|
|
29 |
if (!$post_id || !$comment_id) {
|
|
28 | 30 |
$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'§ion_id='.$section_id/*.'&post_id='.$post_id */); |
29 |
exit(); |
|
30 | 31 |
} else { |
31 |
$comment_id = $cid; |
|
32 |
$post_id = $admin->getIDKEY($pid); |
|
32 |
$post_id = $admin->getIDKEY($post_id); |
|
33 | 33 |
} |
34 | 34 |
|
35 | 35 |
// Update row |
... | ... | |
42 | 42 |
} |
43 | 43 |
else |
44 | 44 |
{ |
45 |
$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'§ion_id='.$section_id.'&post_id='.$post_id); |
|
45 |
$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'§ion_id='.$section_id.'&post_id='.$post_id );
|
|
46 | 46 |
} |
47 | 47 |
|
48 | 48 |
// Print admin footer |
49 | 49 |
$admin->print_footer(); |
50 |
|
|
51 |
?> |
|
52 | 50 |
Also available in: Unified diff
Preparing 2.8.2 stable, last tests