From c8f2e0e96b4f98cc6b602fa55941d2365ad702e9 Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Mon, 12 Jun 2017 11:50:14 +0800 Subject: [PATCH] MDL-59140 core: upgrade 'navcourselimit' if set to old default value --- lib/db/upgrade.php | 10 ++++++++++ version.php | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 91b611e0683..bba7ae9eb5a 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -2877,5 +2877,15 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint(true, 2017061201.00); } + if ($oldversion < 2017061300.01) { + // Check if the value of 'navcourselimit' is set to the old default value, if so, change it to the new default. + if ($CFG->navcourselimit == 20) { + set_config('navcourselimit', 10); + } + + // Main savepoint reached. + upgrade_main_savepoint(true, 2017061300.01); + } + return true; } diff --git a/version.php b/version.php index d9cc08bb9eb..13589f8bc02 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2017061300.00; // YYYYMMDD = weekly release date of this DEV branch. +$version = 2017061300.01; // YYYYMMDD = weekly release date of this DEV branch. // RR = release increments - 00 in DEV branches. // .XX = incremental changes. -- 2.17.1