<?xml version="1.0" encoding="UTF-8" ?>
-<XMLDB PATH="lib/db" VERSION="20100915" COMMENT="XMLDB file for core Moodle tables"
+<XMLDB PATH="lib/db" VERSION="20100920" COMMENT="XMLDB file for core Moodle tables"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../lib/xmldb/xmldb.xsd"
>
<FIELD NAME="version" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="name" NEXT="cron"/>
<FIELD NAME="cron" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="version" NEXT="lastcron"/>
<FIELD NAME="lastcron" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="cron" NEXT="visible"/>
- <FIELD NAME="visible" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="false" DEFAULT="1" SEQUENCE="false" PREVIOUS="lastcron" NEXT="multiple"/>
- <FIELD NAME="multiple" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" PREVIOUS="visible"/>
+ <FIELD NAME="visible" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="false" DEFAULT="1" SEQUENCE="false" PREVIOUS="lastcron"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
upgrade_main_savepoint(true, 2010091700);
}
+ if ($oldversion < 2010092000) {
+ // drop multiple field again because it was still in install.xml in 2.0dev
+
+ // Define field multiple to be dropped from block
+ $table = new xmldb_table('block');
+ $field = new xmldb_field('multiple');
+
+ // Conditionally launch drop field multiple
+ if ($dbman->field_exists($table, $field)) {
+ $dbman->drop_field($table, $field);
+ }
+
+ // Main savepoint reached
+ upgrade_main_savepoint(true, 2010092000);
+ }
+
+
return true;
}
}
$block->name = $blockname; // The name MUST match the directory
- $block->multiple = $blockobj->instance_allow_multiple() ? 1 : 0;
if (empty($block->version)) {
throw new plugin_defective_exception($component, 'Missing block version.');
}
if (empty($currblock->version)) { // block not installed yet, so install it
- // If it allows multiples, start with it enabled
-
$conflictblock = array_search($blocktitle, $blocktitles);
if ($conflictblock !== false) {
// Duplicate block titles are not allowed, they confuse people
defined('MOODLE_INTERNAL') || die();
-$version = 2010091900; // YYYYMMDD = date of the last version bump
+$version = 2010092000; // YYYYMMDD = date of the last version bump
// XX = daily increments
$release = '2.0 Preview 4+ (Build: 20100920)'; // Human-friendly version name