Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…MOODLE_20_STABLE
  • Loading branch information...
commit 13b7a5d4e5d137bf87a1c87564c36ddfff8167be 2 parents f4aea09 + b086b19
Sam Hemelryk samhemelryk authored

Showing 2 changed files with 16 additions and 3 deletions. Show diff stats Hide diff stats

  1. +15 2 lib/db/upgrade.php
  2. +1 1  version.php
17 lib/db/upgrade.php
@@ -6051,11 +6051,12 @@ function xmldb_main_upgrade($oldversion) {
6051 6051 // Define field secret to be added to registration_hubs
6052 6052 $table = new xmldb_table('registration_hubs');
6053 6053 $field = new xmldb_field('secret', XMLDB_TYPE_CHAR, '255', null, null, null,
6054   - $CFG->siteidentifier, 'confirmed');
  6054 + null, 'confirmed');
6055 6055
6056   - // Conditionally launch add field secret
  6056 + // Conditionally launch add field secret and set its value
6057 6057 if (!$dbman->field_exists($table, $field)) {
6058 6058 $dbman->add_field($table, $field);
  6059 + $DB->set_field('registration_hubs', 'secret', $CFG->siteidentifier);
6059 6060 }
6060 6061
6061 6062 // Main savepoint reached
@@ -6136,6 +6137,18 @@ function xmldb_main_upgrade($oldversion) {
6136 6137 upgrade_main_savepoint(true, 2011033004.04);
6137 6138 }
6138 6139
  6140 + if ($oldversion < 2011033004.08) {
  6141 + // Changing the default of field secret on table registration_hubs to NULL
  6142 + $table = new xmldb_table('registration_hubs');
  6143 + $field = new xmldb_field('secret', XMLDB_TYPE_CHAR, '255', null, null, null, null, 'confirmed');
  6144 +
  6145 + // Launch change of default for field secret
  6146 + $dbman->change_field_default($table, $field);
  6147 +
  6148 + // Main savepoint reached
  6149 + upgrade_main_savepoint(true, 2011033004.08);
  6150 + }
  6151 +
6139 6152
6140 6153 return true;
6141 6154 }
2  version.php
@@ -30,7 +30,7 @@
30 30 defined('MOODLE_INTERNAL') || die();
31 31
32 32
33   -$version = 2011033004.07; // 20110330 = branching date YYYYMMDD - do not modify!
  33 +$version = 2011033004.08; // 20110330 = branching date YYYYMMDD - do not modify!
34 34 // RR = release version - do not change in weeklies
35 35 // .XX = incremental changes
36 36

0 comments on commit 13b7a5d

Please sign in to comment.
Something went wrong with that request. Please try again.