aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/upgrades/2010052601.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/upgrades/2010052601.php')
-rw-r--r--engine/lib/upgrades/2010052601.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/engine/lib/upgrades/2010052601.php b/engine/lib/upgrades/2010052601.php
new file mode 100644
index 000000000..a9cca6dc5
--- /dev/null
+++ b/engine/lib/upgrades/2010052601.php
@@ -0,0 +1,27 @@
+<?php
+
+// Upgrade to fix encoding issues on group data: #1963
+
+elgg_set_ignore_access(TRUE);
+
+$params = array('type' => 'group',
+ 'limit' => 0);
+$groups = elgg_get_entities($params);
+if ($groups) {
+ foreach ($groups as $group) {
+ $group->name = _elgg_html_decode($group->name);
+ $group->description = _elgg_html_decode($group->description);
+ $group->briefdescription = _elgg_html_decode($group->briefdescription);
+ $group->website = _elgg_html_decode($group->website);
+ if ($group->interests) {
+ $tags = $group->interests;
+ foreach ($tags as $index => $tag) {
+ $tags[$index] = _elgg_html_decode($tag);
+ }
+ $group->interests = $tags;
+ }
+
+ $group->save();
+ }
+}
+elgg_set_ignore_access(FALSE);