Index: post.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/forum/post.php,v retrieving revision 1.112 diff -u -r1.112 post.php --- post.php 28 Sep 2006 07:29:50 -0000 1.112 +++ post.php 17 Oct 2006 07:24:14 -0000 @@ -9,7 +9,7 @@ $forum = optional_param('forum', 0, PARAM_INT); $edit = optional_param('edit', 0, PARAM_INT); $delete = optional_param('delete', 0, PARAM_INT); - $prune = optional_param('prune',0,PARAM_INT); + $prune = optional_param('prune',0,PARAM_INT); $name = optional_param('name','',PARAM_CLEAN); $confirm = optional_param('confirm',0,PARAM_INT); @@ -67,6 +67,9 @@ require_login(0, false); // Script is useless unless they're logged in if ($post = data_submitted()) { + + + if (empty($post->course)) { error('No course was defined!'); } @@ -558,6 +561,7 @@ } else if (!empty($prune)) { // Pruning + if (!$post = forum_get_post_full($prune)) { error("Post ID was incorrect"); }