From 0a30a59c9dd1c1dd4f1204c0104b7dc6a24a1a9d Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Wed, 28 Nov 2007 05:08:51 +0000 Subject: [PATCH] MDL-11818, single post forum descript = first post --- mod/forum/post.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mod/forum/post.php b/mod/forum/post.php index 70f3abc962..0c7a44cdb9 100644 --- a/mod/forum/post.php +++ b/mod/forum/post.php @@ -488,6 +488,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 -- 2.39.5