1
0

Add Status: 302 header for redirects, have fun, nitrox. :)

This commit is contained in:
Garvin Hicking
2008-08-27 19:20:23 +00:00
parent 80534cb91a
commit 9bfe2cec62
6 changed files with 11 additions and 0 deletions

View File

@ -588,7 +588,9 @@ function serendipity_allowCommentsToggle($entry_id, $switch = 'disable') {
$query = "UPDATE {$serendipity['dbPrefix']}entries SET allow_comments = '" . ($switch == 'disable' ? 'false' : 'true') . "' WHERE id = '". (int)$entry_id ."' $admin";
serendipity_db_query($query);
if (serendipity_isResponseClean($_SERVER['HTTP_REFERER'])) {
header('Status: 302 Found');
header('Location: '. $_SERVER['HTTP_REFERER']);
exit;
}
} else {
die('What are you up to? You need to be an admin to close comments');