aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/upgrades/2010062301.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-08-21 20:51:26 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-08-21 20:51:26 +0000
commit64aafb5ca73d329663a93f80ac9cf3e68a082866 (patch)
treef6462c3112d26aea2ad09cdb76b38abb74183757 /engine/lib/upgrades/2010062301.php
parentc3cbea030adb2201e29897915bfae19f1628c967 (diff)
downloadelgg-64aafb5ca73d329663a93f80ac9cf3e68a082866.tar.gz
elgg-64aafb5ca73d329663a93f80ac9cf3e68a082866.tar.bz2
Merged r6534-6559 from 1.7 branch to trunk
git-svn-id: http://code.elgg.org/elgg/trunk@6840 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/upgrades/2010062301.php')
-rw-r--r--engine/lib/upgrades/2010062301.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/engine/lib/upgrades/2010062301.php b/engine/lib/upgrades/2010062301.php
new file mode 100644
index 000000000..96fd6c810
--- /dev/null
+++ b/engine/lib/upgrades/2010062301.php
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * Change ownership of group ACLs to group entity
+ */
+
+elgg_set_ignore_access(TRUE);
+
+$params = array('type' => 'group',
+ 'limit' => 0);
+$groups = elgg_get_entities($params);
+if ($groups) {
+ foreach ($groups as $group) {
+ $acl = $group->group_acl;
+
+ $query = "UPDATE {$CONFIG->dbprefix}access_collections SET owner_guid = $group->guid WHERE id = $acl";
+ update_data($query);
+ }
+}
+elgg_set_ignore_access(FALSE);
+