From ba6d1638ebb6421406e41e6c237f34414c34fce2 Mon Sep 17 00:00:00 2001 From: sam_marshall Date: Mon, 28 Jul 2008 17:17:22 +0000 Subject: [PATCH] MDL-15498: Completion fix: use of old XMLDBTable, Field in forum upgrade --- mod/forum/db/upgrade.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mod/forum/db/upgrade.php b/mod/forum/db/upgrade.php index 2238402ac2..24a4047f4e 100644 --- a/mod/forum/db/upgrade.php +++ b/mod/forum/db/upgrade.php @@ -89,17 +89,17 @@ function xmldb_forum_upgrade($oldversion=0) { if ($result && $oldversion < 2008072800) { /// Define field completiondiscussions to be added to forum - $table = new XMLDBTable('forum'); - $field = new XMLDBField('completiondiscussions'); - $field->setAttributes(XMLDB_TYPE_INTEGER, '9', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'draft'); + $table = new xmldb_table('forum'); + $field = new xmldb_field('completiondiscussions'); + $field->set_attributes(XMLDB_TYPE_INTEGER, '9', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'draft'); /// Launch add field completiondiscussions if(!$dbman->field_exists($table,$field)) { $dbman->add_field($table, $field); } - $field = new XMLDBField('completionreplies'); - $field->setAttributes(XMLDB_TYPE_INTEGER, '9', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'completiondiscussions'); + $field = new xmldb_field('completionreplies'); + $field->set_attributes(XMLDB_TYPE_INTEGER, '9', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'completiondiscussions'); /// Launch add field completionreplies if(!$dbman->field_exists($table,$field)) { @@ -107,8 +107,8 @@ function xmldb_forum_upgrade($oldversion=0) { } /// Define field completionposts to be added to forum - $field = new XMLDBField('completionposts'); - $field->setAttributes(XMLDB_TYPE_INTEGER, '9', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'completionreplies'); + $field = new xmldb_field('completionposts'); + $field->set_attributes(XMLDB_TYPE_INTEGER, '9', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'completionreplies'); /// Launch add field completionposts if(!$dbman->field_exists($table,$field)) { -- 2.39.5