MDL-24224 fixed typo, credit goes to Anthony Borrow
authorPetr Skoda <skodak@moodle.org>
Sun, 19 Sep 2010 15:21:22 +0000 (15:21 +0000)
committerPetr Skoda <skodak@moodle.org>
Sun, 19 Sep 2010 15:21:22 +0000 (15:21 +0000)
mod/forum/db/upgrade.php

index 2abd977..ea0c833 100644 (file)
@@ -133,7 +133,7 @@ function xmldb_forum_upgrade($oldversion) {
                     continue;
                 }
                 if (!$fs->file_exists($context->id, 'mod_form', $filearea, $post->id, '/', $filename)) {
-                    $file_record = array('contextid'=>$context->id, 'component'=>'mod_form', 'filearea'=>$filearea, 'itemid'=>$post->id, 'filepath'=>'/', 'filename'=>$filename, 'userid'=>$post->userid);
+                    $file_record = array('contextid'=>$context->id, 'component'=>'mod_forum', 'filearea'=>$filearea, 'itemid'=>$post->id, 'filepath'=>'/', 'filename'=>$filename, 'userid'=>$post->userid);
                     if ($fs->create_file_from_pathname($file_record, $filepath)) {
                         $post->attachment = '1';
                         $DB->update_record('forum_posts', $post);