NOBUG: comment is a reserved word for oracle. I reserve my comments about it ;-)
authorEloy Lafuente <stronk7@moodle.org>
Mon, 22 Mar 2010 17:49:42 +0000 (17:49 +0000)
committerEloy Lafuente <stronk7@moodle.org>
Mon, 22 Mar 2010 17:49:42 +0000 (17:49 +0000)
mod/data/db/upgrade.php
mod/glossary/db/upgrade.php

index 8c16082..58a73b5 100644 (file)
@@ -193,7 +193,7 @@ function xmldb_data_upgrade($oldversion) {
                 d.course AS courseid,
                 r.id AS itemid,
                 c.id AS commentid,
-                c.content AS comment,
+                c.content AS commentcontent,
                 c.format AS format,
                 c.created AS timemodified
                 FROM {data_comments} c, {data_records} r, {data} d
@@ -220,7 +220,7 @@ function xmldb_data_upgrade($oldversion) {
                     $cmt->itemid    = $res->itemid;
                     $comment = new comment($cmt);
                     // comments class will throw an exception if error occurs
-                    $cmt = $comment->add($res->comment, $res->format);
+                    $cmt = $comment->add($res->commentcontent, $res->format);
                     if (!empty($cmt)) {
                         $DB->delete_records('data_comments', array('id'=>$res->commentid));
                     }
index 8c5b4e6..168b91e 100644 (file)
@@ -217,7 +217,7 @@ function xmldb_glossary_upgrade($oldversion) {
                 g.course AS courseid,
                 e.id AS itemid,
                 c.id AS old_id,
-                c.entrycomment AS comment,
+                c.entrycomment AS commentcontent,
                 c.entrycommentformat AS format,
                 c.entrycommenttrust AS trust,
                 c.timemodified AS timemodified
@@ -244,7 +244,7 @@ function xmldb_glossary_upgrade($oldversion) {
                     $cmt->area      = 'glossary_entry';
                     $cmt->itemid    = $res->itemid;
                     $comment = new comment($cmt);
-                    $cmt = $comment->add($res->comment, $res->format);
+                    $cmt = $comment->add($res->commentcontent, $res->format);
                     if (!empty($cmt)) {
                         $DB->delete_records('glossary_comments', array('id'=>$res->old_id));
                     }