From cd9afe2ff6fdd0b669acf64a2d88b01b7d678bf9 Mon Sep 17 00:00:00 2001 From: patrickslee Date: Tue, 14 Mar 2006 03:02:12 +0000 Subject: [PATCH] Set default enrolment plugin to manual if the previous default is not an interactive enrolment plugin --- lib/db/mysql.php | 8 ++++++++ lib/db/postgres7.php | 8 ++++++++ version.php | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/db/mysql.php b/lib/db/mysql.php index 850a28d94d..af6c043d0a 100644 --- a/lib/db/mysql.php +++ b/lib/db/mysql.php @@ -1722,6 +1722,14 @@ function main_upgrade($oldversion=0) { ) TYPE=MyISAM COMMENT ='tag instance for blogs.';"); } + if ($oldversion < 2006031400) { + require_once("$CFG->dirroot/enrol/enrol.class.php"); + $defaultenrol = enrolment_factory::factory($CFG->enrol); + if (!method_exists($defaultenrol, 'print_entry')) { + set_config('enrol', 'manual'); + } + } + return $result; } diff --git a/lib/db/postgres7.php b/lib/db/postgres7.php index 94cf28c25c..2cbdc8eb35 100644 --- a/lib/db/postgres7.php +++ b/lib/db/postgres7.php @@ -1463,6 +1463,14 @@ function main_upgrade($oldversion=0) { );"); } + if ($oldversion < 2006031400) { + require_once("$CFG->dirroot/enrol/enrol.class.php"); + $defaultenrol = enrolment_factory::factory($CFG->enrol); + if (!method_exists($defaultenrol, 'print_entry')) { + set_config('enrol', 'manual'); + } + } + return $result; } diff --git a/version.php b/version.php index d16c7b0691..df40846dc9 100644 --- a/version.php +++ b/version.php @@ -6,7 +6,7 @@ // This is compared against the values stored in the database to determine // whether upgrades should be performed (see lib/db/*.php) - $version = 2006031000; // YYYYMMDD = date + $version = 2006031400; // YYYYMMDD = date // XY = increments within a single day $release = '1.6 development'; // Human-friendly version name -- 2.39.5