checkInstall.phtml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. declare(strict_types=1);
  3. /** @var FreshRSS_View $this */
  4. $this->partial('aside_configure');
  5. ?>
  6. <main class="post">
  7. <h1><?= _t('gen.menu.check_install') ?></h1>
  8. <h2><?= _t('install.check.php') ?></h2>
  9. <?php foreach ($this->status_php as $key => $status) { ?>
  10. <p class="alert <?= match ($status) { 'ok' => 'alert-success', 'warn' => 'alert-warn', default => 'alert-error' } ?>">
  11. <?php
  12. if ($key === 'php') {
  13. echo _t('install.check.' . $key . '.' . ($status === 'ok' ? 'ok' : 'nok'), PHP_VERSION, FRESHRSS_MIN_PHP_VERSION);
  14. } else {
  15. echo _t('install.check.' . $key . '.' . ($status === 'ok' ? 'ok' : 'nok'));
  16. }
  17. ?>
  18. </p>
  19. <?php } ?>
  20. <h2><?= _t('install.check.files') ?></h2>
  21. <?php foreach ($this->status_files as $key => $status) { ?>
  22. <p class="alert <?= match ($status) { 'ok' => 'alert-success', 'warn' => 'alert-warn', default => 'alert-error' } ?>">
  23. <?= _t('install.check.' . $key . '.' . ($status === 'ok' ? 'ok' : 'nok')) ?>
  24. </p>
  25. <?php } ?>
  26. <h2><?= _t('install.check.database-title') ?></h2>
  27. <?php foreach ($this->status_database as $key => $status) { ?>
  28. <?php if ($key === 'table') { continue; } ?>
  29. <p class="alert <?= match ($status) { true => 'alert-success', default => 'alert-error' } ?>">
  30. <?= _t('install.check.database-' . $key . '.' . ($status === true ? 'ok' : 'nok')) ?>
  31. </p>
  32. <?php } ?>
  33. <?php foreach ((array) $this->status_database['table'] as $key => $status) { ?>
  34. <p class="alert <?= match ($status) { true => 'alert-success', default => 'alert-error' } ?>">
  35. <?= sprintf(_t('install.check.database-table.' . ($status === true ? 'ok' : 'nok')), $key) ?>
  36. </p>
  37. <?php } ?>
  38. </main>