From e90737c7fe071134992cc06893ab2c1390ecf545 Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Thu, 9 Mar 2006 03:22:20 +0000 Subject: [PATCH] [multienrol]More changes to the internal->manual transition --- lib/db/mysql.php | 5 +++++ lib/db/postgres7.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lib/db/mysql.php b/lib/db/mysql.php index 8fcbbda755..9f0f535939 100644 --- a/lib/db/mysql.php +++ b/lib/db/mysql.php @@ -1673,6 +1673,11 @@ function main_upgrade($oldversion=0) { execute_sql("UPDATE {$CFG->prefix}user_teachers SET enrol='manual' WHERE enrol=''"); } + if ($oldversion < 2005103101) { // rename internal to manual + set_config('enrol_plugins_enabled', str_replace('internal', 'manual', $CFG->enrol_plugins_enabled)); + set_config('enrol', str_replace('internal', 'manual', $CFG->enrol)); + } + return $result; } diff --git a/lib/db/postgres7.php b/lib/db/postgres7.php index d123db91f8..c3addef052 100644 --- a/lib/db/postgres7.php +++ b/lib/db/postgres7.php @@ -1416,6 +1416,11 @@ function main_upgrade($oldversion=0) { execute_sql("UPDATE {$CFG->prefix}user_teachers SET enrol='manual' WHERE enrol=''"); } + if ($oldversion < 2005103101) { // rename internal to manual + set_config('enrol_plugins_enabled', str_replace('internal', 'manual', $CFG->enrol_plugins_enabled)); + set_config('enrol', str_replace('internal', 'manual', $CFG->enrol)); + } + return $result; } -- 2.39.5