MDL-11818, single post forum descript = first post

This commit is contained in:
toyomoyo
2007-11-28 05:06:41 +00:00
parent 200f64d220
commit 1e81a1295e
+9
View File
@@ -498,6 +498,15 @@
if (!forum_update_post($updatepost, $message)) {
error(get_string("couldnotupdate", "forum"), $errordestination);
}
// MDL-11818
if (($forum->type == 'single') && ($updatepost->parent == '0')){ // updating first post of single discussion type -> updating forum intro
$forum->intro = $updatepost->message;
$forum->timemodified = time();
if (!update_record("forum", $forum)) {
error(get_string("couldnotupdate", "forum"), $errordestination);
}
}
$timemessage = 2;
if (!empty($message)) { // if we're printing stuff about the file upload