requirements.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * Install requirements checking page
  4. *
  5. * @uses $vars['num_failures] Number of requirements failures
  6. * @uses $vars['num_warnings] Number of recommendation warnings
  7. */
  8. if ($vars['num_failures'] != 0) {
  9. $instruct_text = elgg_echo('install:requirements:instructions:failure');
  10. } elseif ($vars['num_warnings'] != 0) {
  11. $instruct_text = elgg_echo('install:requirements:instructions:warning');
  12. } else {
  13. $instruct_text = elgg_echo('install:requirements:instructions:success');
  14. }
  15. echo elgg_autop($instruct_text);
  16. $report = $vars['report'];
  17. foreach ($report as $category => $checks) {
  18. $title = elgg_echo("install:require:$category");
  19. echo "<h3>$title</h3>";
  20. echo "<ul class=\"elgg-require-$category\">";
  21. foreach ($checks as $check) {
  22. echo "<li class=\"{$check['severity']}\">";
  23. echo elgg_autop($check['message']);
  24. echo "</li>";
  25. }
  26. echo "</ul>";
  27. }
  28. $vars['refresh'] = true;
  29. // cannot advance to next step with a failure
  30. if ($vars['num_failures'] != 0) {
  31. $vars['advance'] = false;
  32. }
  33. echo elgg_view('install/nav', $vars);