Revision 1457
Added by Dietmar almost 13 years ago
save_comment.php | ||
---|---|---|
29 | 29 |
$comment_id = (int)$_POST['comment_id']; |
30 | 30 |
} |
31 | 31 |
|
32 |
$admin_header = false; |
|
33 |
// Tells script to update when this page was last updated |
|
34 |
$update_when_modified = true; |
|
35 |
// show the info banner |
|
36 |
// $print_info_banner = true; |
|
32 | 37 |
// Include WB admin wrapper script |
33 |
$update_when_modified = true; // Tells script to update when this page was last updated |
|
34 | 38 |
require(WB_PATH.'/modules/admin.php'); |
35 | 39 |
|
36 | 40 |
if (!$admin->checkFTAN()) |
37 | 41 |
{ |
42 |
$admin->print_header(); |
|
38 | 43 |
$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id ); |
39 |
exit(); |
|
40 | 44 |
} |
41 | 45 |
|
42 |
$id = $admin->getIDKEY($comment_id);
|
|
46 |
$id = intval($admin->getIDKEY($comment_id));
|
|
43 | 47 |
|
44 | 48 |
// Validate all fields |
45 | 49 |
if($admin->get_post('title') == '' AND $admin->get_post('comment') == '') |
46 | 50 |
{ |
51 |
$admin->print_header(); |
|
47 | 52 |
$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/news/modify_comment.php?page_id='.$page_id.'§ion_id='.$section_id.'comment_id='.$id); |
48 | 53 |
} |
49 | 54 |
else |
... | ... | |
60 | 65 |
// Update row |
61 | 66 |
$database->query("UPDATE ".TABLE_PREFIX."mod_news_comments SET title = '$title', comment = '$comment' WHERE comment_id = '$comment_id'"); |
62 | 67 |
|
68 |
$admin->print_header(); |
|
63 | 69 |
// Check if there is a db error, otherwise say successful |
64 | 70 |
if($database->is_error()) |
65 | 71 |
{ |
66 | 72 |
Also available in: Unified diff
Preparing 2.8.2 stable, last tests