From 6e1cef3394a5d46ba8c11f307af5cc284c429ee6 Mon Sep 17 00:00:00 2001 From: skodak Date: Mon, 26 Mar 2007 20:14:27 +0000 Subject: [PATCH] MDL-8513 fixed conversion of ldap settings during upgrade to 1.8 --- lib/db/upgrade.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index f02f7f3fbea..276c3cd5e73 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -140,6 +140,15 @@ function xmldb_main_upgrade($oldversion=0) { } $authplugins = get_list_of_plugins('auth'); foreach ($CFG as $k => $v) { + if (strpos($k, 'ldap_') === 0) { + //upgrade nonstandard ldap settings + $setting = substr($k, 5); + if (set_config($setting, $v, "auth/ldap")) { + delete_records('config', 'name', $k); + unset($CFG->{$k}); + } + continue; + } if (strpos($k, 'auth_') !== 0) { continue; }