Files
FreshRSS/app/views/update/checkInstall.phtml
Christian Weiske 560b772e43 Re-add database status in installation check (#8510)
* Re-add database status in installation check

It got disabled in 2014 to get a beta out.
Time to re-enable it.

Tested on SQLite.

"checkTable" now only verifies that at least the expected columns
exist, but does not fail on additional columns provided by
e.g. extensions.

Related: https://github.com/FreshRSS/FreshRSS/issues/678

* make fix-all

* i18n

* Simpler and more correct content_bin

* Fix PostgreSQL

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2026-03-02 12:43:35 +01:00

45 lines
1.6 KiB
PHTML

<?php
declare(strict_types=1);
/** @var FreshRSS_View $this */
$this->partial('aside_configure');
?>
<main class="post">
<h1><?= _t('gen.menu.check_install') ?></h1>
<h2><?= _t('install.check.php') ?></h2>
<?php foreach ($this->status_php as $key => $status) { ?>
<p class="alert <?= match ($status) { 'ok' => 'alert-success', 'warn' => 'alert-warn', default => 'alert-error' } ?>">
<?php
if ($key === 'php') {
echo _t('install.check.' . $key . '.' . ($status === 'ok' ? 'ok' : 'nok'), PHP_VERSION, FRESHRSS_MIN_PHP_VERSION);
} else {
echo _t('install.check.' . $key . '.' . ($status === 'ok' ? 'ok' : 'nok'));
}
?>
</p>
<?php } ?>
<h2><?= _t('install.check.files') ?></h2>
<?php foreach ($this->status_files as $key => $status) { ?>
<p class="alert <?= match ($status) { 'ok' => 'alert-success', 'warn' => 'alert-warn', default => 'alert-error' } ?>">
<?= _t('install.check.' . $key . '.' . ($status === 'ok' ? 'ok' : 'nok')) ?>
</p>
<?php } ?>
<h2><?= _t('install.check.database-title') ?></h2>
<?php foreach ($this->status_database as $key => $status) { ?>
<?php if ($key === 'table') { continue; } ?>
<p class="alert <?= match ($status) { true => 'alert-success', default => 'alert-error' } ?>">
<?= _t('install.check.database-' . $key . '.' . ($status === true ? 'ok' : 'nok')) ?>
</p>
<?php } ?>
<?php foreach ((array) $this->status_database['table'] as $key => $status) { ?>
<p class="alert <?= match ($status) { true => 'alert-success', default => 'alert-error' } ?>">
<?= sprintf(_t('install.check.database-table.' . ($status === true ? 'ok' : 'nok')), $key) ?>
</p>
<?php } ?>
</main>