datadirs.php 757 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Data dirs upgrade page
  4. */
  5. // Upgrade also possible hidden users. This feature get run
  6. // by an administrator so there's no need to ignore access.
  7. $access_status = access_get_show_hidden_status();
  8. access_show_hidden_entities(true);
  9. $factory = new ElggUpgrade();
  10. $upgrade = $factory->getUpgradeFromPath('admin/upgrades/datadirs');
  11. if ($upgrade->isCompleted()) {
  12. $count = 0;
  13. } else {
  14. $helper = new Elgg\Upgrades\Helper2013022000(
  15. elgg_get_site_entity()->guid,
  16. elgg_get_config('dbprefix')
  17. );
  18. $helper->forgetFailures();
  19. $count = $helper->countUnmigratedUsers();
  20. }
  21. echo elgg_view('admin/upgrades/view', array(
  22. 'count' => $count,
  23. 'action' => 'action/admin/upgrades/upgrade_datadirs',
  24. ));
  25. access_show_hidden_entities($access_status);