order_groups.php 301 B

123456789101112131415161718
  1. <?php
  2. /**
  3. * jQuery actions to order groups
  4. */
  5. $guids = get_input("guids");
  6. $order = 1;
  7. if (!empty($guids) && is_array($guids)) {
  8. foreach ($guids as $guid) {
  9. $group = get_entity($guid);
  10. if (!empty($group) && elgg_instanceof($group, "group")) {
  11. $group->order = $order;
  12. $order++;
  13. }
  14. }
  15. }