aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/upgrades/2011021800-1.8_svn-goodbye_walled_garden-083121a656d06894.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-04-09 14:58:15 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-04-09 14:58:15 +0000
commit2e51b49335c7cd23a7d64383621a7009368c16e3 (patch)
tree17dee2869f2946bd54d4227dacfd28dffe92e7aa /engine/lib/upgrades/2011021800-1.8_svn-goodbye_walled_garden-083121a656d06894.php
parent8ba402da459956a29e47df6598fe778cfea0f8d3 (diff)
downloadelgg-2e51b49335c7cd23a7d64383621a7009368c16e3.tar.gz
elgg-2e51b49335c7cd23a7d64383621a7009368c16e3.tar.bz2
Refs #3241 deleting old config value in registration upgrade
git-svn-id: http://code.elgg.org/elgg/trunk@8965 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/upgrades/2011021800-1.8_svn-goodbye_walled_garden-083121a656d06894.php')
-rw-r--r--engine/lib/upgrades/2011021800-1.8_svn-goodbye_walled_garden-083121a656d06894.php7
1 files changed, 7 insertions, 0 deletions
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);