MDL-17227 forum: add sesskey to post/discussion deletion. Backported from HEAD

This commit is contained in:
stronk7
2008-11-14 09:01:32 +00:00
parent 9173d81bbc
commit df09bb83a1
+4 -4
View File
@@ -505,7 +505,7 @@
$replycount = forum_count_replies($post);
if (!empty($confirm)) { // User has confirmed the delete
if (!empty($confirm) && confirm_sesskey()) { // User has confirmed the delete
if ($post->totalscore) {
notice(get_string("couldnotdeleteratings", "forum"),
@@ -561,7 +561,7 @@
}
print_header();
notice_yesno(get_string("deletesureplural", "forum", $replycount+1),
"post.php?delete=$delete&confirm=$delete",
"post.php?delete=$delete&confirm=$delete&sesskey=".sesskey(),
$CFG->wwwroot.'/mod/forum/discuss.php?d='.$post->discussion.'#'.$post->id);
forum_print_post($post, $course->id, $ownpost=false, $reply=false, $link=false);
@@ -576,7 +576,7 @@
} else {
print_header();
notice_yesno(get_string("deletesure", "forum", $replycount),
"post.php?delete=$delete&confirm=$delete",
"post.php?delete=$delete&confirm=$delete&sesskey=".sesskey(),
$CFG->wwwroot.'/mod/forum/discuss.php?d='.$post->discussion.'#'.$post->id);
forum_print_post($post, $forum->course, $ownpost=false, $reply=false, $link=false);
}
@@ -818,4 +818,4 @@
print_footer($course);
?>
?>