Permalink
Browse files

Merge branch 'MDL-27635_m20' of git://github.com/rwijaya/moodle into …

…MOODLE_20_STABLE
  • Loading branch information...
2 parents f4aea09 + b086b19 commit 13b7a5d4e5d137bf87a1c87564c36ddfff8167be Sam Hemelryk committed Sep 12, 2011
Showing with 16 additions and 3 deletions.
  1. +15 −2 lib/db/upgrade.php
  2. +1 −1 version.php
View
17 lib/db/upgrade.php
@@ -6051,11 +6051,12 @@ function xmldb_main_upgrade($oldversion) {
// Define field secret to be added to registration_hubs
$table = new xmldb_table('registration_hubs');
$field = new xmldb_field('secret', XMLDB_TYPE_CHAR, '255', null, null, null,
- $CFG->siteidentifier, 'confirmed');
+ null, 'confirmed');
- // Conditionally launch add field secret
+ // Conditionally launch add field secret and set its value
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
+ $DB->set_field('registration_hubs', 'secret', $CFG->siteidentifier);
}
// Main savepoint reached
@@ -6136,6 +6137,18 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2011033004.04);
}
+ if ($oldversion < 2011033004.08) {
+ // Changing the default of field secret on table registration_hubs to NULL
+ $table = new xmldb_table('registration_hubs');
+ $field = new xmldb_field('secret', XMLDB_TYPE_CHAR, '255', null, null, null, null, 'confirmed');
+
+ // Launch change of default for field secret
+ $dbman->change_field_default($table, $field);
+
+ // Main savepoint reached
+ upgrade_main_savepoint(true, 2011033004.08);
+ }
+
return true;
}
View
2 version.php
@@ -30,7 +30,7 @@
defined('MOODLE_INTERNAL') || die();
-$version = 2011033004.07; // 20110330 = branching date YYYYMMDD - do not modify!
+$version = 2011033004.08; // 20110330 = branching date YYYYMMDD - do not modify!
// RR = release version - do not change in weeklies
// .XX = incremental changes

0 comments on commit 13b7a5d

Please sign in to comment.