aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/upgrades/2010052601.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-29 02:16:50 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-29 02:16:50 +0000
commita19462d8b0c1bc07597c78c92a79415694eee3eb (patch)
treeb2c964f07489547636ff638955bd294a9a337584 /engine/lib/upgrades/2010052601.php
parente4ec0953685ae79c7fe9e15b318b369dfb29839b (diff)
downloadelgg-a19462d8b0c1bc07597c78c92a79415694eee3eb.tar.gz
elgg-a19462d8b0c1bc07597c78c92a79415694eee3eb.tar.bz2
Merged [6223] - [6228] into trunk.
git-svn-id: http://code.elgg.org/elgg/trunk@6283 36083f99-b078-4883-b0ff-0f9b5a30f544
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..5b477910f
--- /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 = html_entity_decode($group->name, ENT_COMPAT, 'UTF-8');
+ $group->description = html_entity_decode($group->description, ENT_COMPAT, 'UTF-8');
+ $group->briefdescription = html_entity_decode($group->briefdescription, ENT_COMPAT, 'UTF-8');
+ $group->website = html_entity_decode($group->website, ENT_COMPAT, 'UTF-8');
+ if ($group->interests) {
+ $tags = $group->interests;
+ foreach ($tags as $index=>$tag) {
+ $tags[$index] = html_entity_decode($tag, ENT_COMPAT, 'UTF-8');
+ }
+ $group->interests = $tags;
+ }
+
+ $group->save();
+ }
+}
+elgg_set_ignore_access(FALSE);