]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #3241 deleting old config value in registration upgrade
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 9 Apr 2011 14:58:15 +0000 (14:58 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 9 Apr 2011 14:58:15 +0000 (14:58 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8965 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/upgrades/2011021800-1.8_svn-goodbye_walled_garden-083121a656d06894.php

index 5f98ef53558bc89c2d8a9207fc748f84e4a3d37a..40b2c71d59a322f31831b8c1d8ef3d7e8abfcfda 100644 (file)
@@ -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);