This commit is contained in:
moodler
2005-11-25 07:11:20 +00:00
parent 39fe163a32
commit afa3507ca2
+11
View File
@@ -95,6 +95,17 @@
} else if ($post->edit) { // Updating a post
$post->id = $post->edit;
$message = '';
//fix for bug #4314
if (!$realpost = get_record('forum_posts','id',$post->id)){
$realpost = new object;
$realpost->userid = -1;
}
if ($realpost->userid <> $USER->id && !isadmin()){
error ("you can not update this post");
}
if (get_field('forum', 'type', 'id', $forum) == 'news' && !$post->parent) {
$updatediscussion->id = $post->discussion;
if (empty($post->timestartdisabled)) {