Merge branch 'MDL-50805_master' of https://github.com/crazyserver/moodle
authorAndrew Nicols <andrew@nicols.co.uk>
Tue, 6 Oct 2015 02:42:55 +0000 (10:42 +0800)
committerDan Poltawski <dan@moodle.com>
Tue, 6 Oct 2015 15:29:14 +0000 (16:29 +0100)
1  2 
lib/db/upgrade.php
version.php

@@@ -4572,17 -4572,20 +4572,32 @@@ function xmldb_main_upgrade($oldversion
          upgrade_main_savepoint(true, 2015092200.00);
      }
  
 -    if ($oldversion < 2015100100.00) {
 +    if ($oldversion < 2015092900.00) {
 +        // Rename backup_auto_keep setting to backup_auto_max_kept.
 +        $keep = get_config('backup', 'backup_auto_keep');
 +        if ($keep !== false) {
 +            set_config('backup_auto_max_kept', $keep, 'backup');
 +            unset_config('backup_auto_keep', 'backup');
 +        }
 +
 +        // Main savepoint reached.
 +        upgrade_main_savepoint(true, 2015092900.00);
 +    }
 +
++    if ($oldversion < 2015100600.00) {
+         // Define index notification (not unique) to be added to message_read.
+         $table = new xmldb_table('message_read');
+         $index = new xmldb_index('notificationtimeread', XMLDB_INDEX_NOTUNIQUE, array('notification', 'timeread'));
+         // Conditionally launch add index notification.
+         if (!$dbman->index_exists($table, $index)) {
+             $dbman->add_index($table, $index);
+         }
+         // Main savepoint reached.
 -        upgrade_main_savepoint(true, 2015100100.00);
++        upgrade_main_savepoint(true, 2015100600.00);
+     }
      return true;
  }
diff --cc version.php
@@@ -29,7 -29,7 +29,7 @@@
  
  defined('MOODLE_INTERNAL') || die();
  
- $version  = 2015100200.00;              // YYYYMMDD      = weekly release date of this DEV branch.
 -$version  = 2015100100.00;              // YYYYMMDD      = weekly release date of this DEV branch.
++$version  = 2015100600.00;              // YYYYMMDD      = weekly release date of this DEV branch.
                                          //         RR    = release increments - 00 in DEV branches.
                                          //           .XX = incremental changes.