save_sort.php 357 B

12345678910111213141516
  1. <?php
  2. $guid = get_input("guid");
  3. if ($entity = get_entity($guid)) {
  4. if ($entity instanceof ElggGroup && $entity->canEdit()) {
  5. $sort = get_input("sort");
  6. $sort_direction = get_input("sort_direction");
  7. $entity->file_tools_sort = $sort;
  8. $entity->file_tools_sort_direction = $sort_direction;
  9. forward($entity->getURL());
  10. }
  11. }
  12. forward(REFERER);