aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-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);