From 2e51b49335c7cd23a7d64383621a7009368c16e3 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 9 Apr 2011 14:58:15 +0000 Subject: Refs #3241 deleting old config value in registration upgrade git-svn-id: http://code.elgg.org/elgg/trunk@8965 36083f99-b078-4883-b0ff-0f9b5a30f544 --- .../2011021800-1.8_svn-goodbye_walled_garden-083121a656d06894.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'engine/lib') diff --git a/engine/lib/upgrades/2011021800-1.8_svn-goodbye_walled_garden-083121a656d06894.php b/engine/lib/upgrades/2011021800-1.8_svn-goodbye_walled_garden-083121a656d06894.php index 5f98ef535..40b2c71d5 100644 --- a/engine/lib/upgrades/2011021800-1.8_svn-goodbye_walled_garden-083121a656d06894.php +++ b/engine/lib/upgrades/2011021800-1.8_svn-goodbye_walled_garden-083121a656d06894.php @@ -6,6 +6,8 @@ * Removes the Walled Garden plugin in favor of new system settings */ +global $CONFIG; + $access = elgg_set_ignore_access(TRUE); if (elgg_is_active_plugin('walledgarden')) { @@ -22,6 +24,11 @@ $disable_registration = elgg_get_config('disable_registration'); if ($disable_registration !== null) { $allow_registration = !$disable_registration; elgg_save_config('allow_registration', $allow_registration); + + $site = elgg_get_site_entity(); + $query = "DELETE FROM {$CONFIG->dbprefix}config + WHERE name = 'disable_registration' AND site_guid = $site->guid"; + delete_data($query); } elgg_set_ignore_access($access); -- cgit v1.2.3