diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index dd4436c272d..7202700817d 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -5317,27 +5317,6 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL"); upgrade_main_savepoint(true, 2010102300); } - //MDL-24771 - if ($oldversion < 2010102600) { - - $fieldnotification = new xmldb_field('notification', XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, 0, 'smallmessage'); - $fieldcontexturl = new xmldb_field('contexturl', XMLDB_TYPE_CHAR, '255', null, null, null, null, 'notification'); - $fieldcontexturlname = new xmldb_field('contexturlname', XMLDB_TYPE_CHAR, '255', null, null, null, null, 'contexturl'); - $fieldstoadd = array($fieldnotification, $fieldcontexturl, $fieldcontexturlname); - - $tablestomodify = array(new xmldb_table('message'), new xmldb_table('message_read')); - - foreach($tablestomodify as $table) { - foreach($fieldstoadd as $field) { - if (!$dbman->field_exists($table, $field)) { - $dbman->add_field($table, $field); - } - } - } - - upgrade_main_savepoint(true, 2010102600); - } - // MDL-24694 needs increasing size of user_preferences.name(varchar[50]) field due to // long preferences names for messaging which need components parts within the name // eg: 'message_provider_mod_assignment_assignments_loggedin' @@ -5367,6 +5346,27 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL"); upgrade_main_savepoint(true, 2010102600); } + //MDL-24771 + if ($oldversion < 2010102601) { + + $fieldnotification = new xmldb_field('notification', XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, 0, 'smallmessage'); + $fieldcontexturl = new xmldb_field('contexturl', XMLDB_TYPE_CHAR, '255', null, null, null, null, 'notification'); + $fieldcontexturlname = new xmldb_field('contexturlname', XMLDB_TYPE_CHAR, '255', null, null, null, null, 'contexturl'); + $fieldstoadd = array($fieldnotification, $fieldcontexturl, $fieldcontexturlname); + + $tablestomodify = array(new xmldb_table('message'), new xmldb_table('message_read')); + + foreach($tablestomodify as $table) { + foreach($fieldstoadd as $field) { + if (!$dbman->field_exists($table, $field)) { + $dbman->add_field($table, $field); + } + } + } + + upgrade_main_savepoint(true, 2010102601); + } + return true; } diff --git a/version.php b/version.php index 1af1fe0db54..533ad194933 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2010102600; // YYYYMMDD = date of the last version bump +$version = 2010102601; // YYYYMMDD = date of the last version bump // XX = daily increments $release = '2.0 RC1 (Build: 20101026)'; // Human-friendly version name