From: skodak Date: Tue, 2 Oct 2007 16:50:43 +0000 (+0000) Subject: DONAL, PLEASE START USING OUR DB EDITOR! the last commit did have invalid XML, incorr... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c57be126c48c3d8e9f9f16d67846bb3a94c3dafa;p=moodle.git DONAL, PLEASE START USING OUR DB EDITOR! the last commit did have invalid XML, incorrect next/prev attributes, different data in install.xml and upgrade.php; the main reason to have this editor was to prevent this type of critical errors ;-) --- diff --git a/lib/db/install.xml b/lib/db/install.xml index 8811be30d3..84a7cf83c1 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -1093,10 +1093,8 @@ - - - - + + @@ -1719,8 +1717,8 @@ - - + + diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 25594cb8d4..e097f93c25 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -2286,22 +2286,23 @@ function xmldb_main_upgrade($oldversion=0) { } } + if ($oldversion < 2007100300) { - // - // MNET stuff for roaming theme - // + /// MNET stuff for roaming theme + /// Define field force_theme to be added to mnet_host $table = new XMLDBTable('mnet_host'); - $field = new XMLDBField('force_theme'); - $field->setAttributes(XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, null, null, '0', 'last_log_id'); + $field->setAttributes(XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'last_log_id'); - // Launch add field theme + /// Launch add field force_theme $result = $result && add_field($table, $field); + /// Define field theme to be added to mnet_host + $table = new XMLDBTable('mnet_host'); $field = new XMLDBField('theme'); $field->setAttributes(XMLDB_TYPE_CHAR, '100', null, null, null, null, null, null, 'force_theme'); - // Launch add field force_theme + /// Launch add field theme $result = $result && add_field($table, $field); }