upgrade.php 1.0 KB

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * Page shell for upgrade script
  4. *
  5. * Displays an ajax loader until upgrade is complete
  6. *
  7. * @uses $vars['head'] Parameters for the <head> element
  8. * @uses $vars['body'] The main content of the page
  9. * @uses $vars['sysmessages'] A 2d array of various message registers, passed from system_messages()
  10. * @uses $var['forward'] A relative path to forward to after upgrade. Defaults to /admin
  11. */
  12. $refresh_url = elgg_http_add_url_query_elements(elgg_get_site_url() . 'upgrade.php', array(
  13. 'upgrade' => 'upgrade',
  14. 'forward' => elgg_extract('forward', $vars, '/admin')
  15. ));
  16. $refresh_url = htmlspecialchars($refresh_url);
  17. // render content before head so that JavaScript and CSS can be loaded. See #4032
  18. $body = "<div style='margin-top:200px'>" . elgg_view('graphics/ajax_loader', array('hidden' => false)) . "</div>";
  19. $head = elgg_view('page/elements/head', $vars['head']);
  20. $head .= "<meta http-equiv='refresh' content='1;url=$refresh_url' />";
  21. echo elgg_view("page/elements/html", array("head" => $head, "body" => $body));