2010052601.php 711 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. // Upgrade to fix encoding issues on group data: #1963
  3. elgg_set_ignore_access(TRUE);
  4. $params = array('type' => 'group',
  5. 'limit' => 0);
  6. $groups = elgg_get_entities($params);
  7. if ($groups) {
  8. foreach ($groups as $group) {
  9. $group->name = _elgg_html_decode($group->name);
  10. $group->description = _elgg_html_decode($group->description);
  11. $group->briefdescription = _elgg_html_decode($group->briefdescription);
  12. $group->website = _elgg_html_decode($group->website);
  13. if ($group->interests) {
  14. $tags = $group->interests;
  15. foreach ($tags as $index => $tag) {
  16. $tags[$index] = _elgg_html_decode($tag);
  17. }
  18. $group->interests = $tags;
  19. }
  20. $group->save();
  21. }
  22. }
  23. elgg_set_ignore_access(FALSE);