fix lock warning

This commit is contained in:
github-actions
2024-08-06 11:02:55 +02:00
parent ed1ecafd84
commit 0d308e2e2a
2 changed files with 12 additions and 9 deletions

View File

@@ -42,9 +42,11 @@ class Debug extends CI_Controller
// get mig version from config file
$this->load->config('migration');
$data['migration_config'] = $this->config->item('migration_version');
$data['migration_lockfile'] = $this->config->item('migration_lockfile');
$data['miglock_lifetime'] = $this->config->item('migration_lf_maxage');
// compare mig versions
if ($data['migration_version'] !== $data['migration_config'] && file_exists('application/cache/.migration_running')) {
if ($data['migration_version'] != $data['migration_config'] && file_exists($data['migration_lockfile'])) {
$data['migration_is_uptodate'] = false;
} else {
$data['migration_is_uptodate'] = true;

View File

@@ -40,14 +40,15 @@
<td><?php echo (isset($migration_version) ? $migration_version : "<span class='badge text-bg-danger'>". __("There is something wrong with your Migration in Database!") . "</span>"); ?></td>
</tr>
<?php if (!$migration_is_uptodate) { ?>
</table>
<div class="alert alert-danger mt-3 mb-3">
<h5><?= __("Migration is outdated and locked!"); ?></h5>
<p><?= sprintf(__("The current migration is not the version it is supposed to be. Reload this page. If this warning persists, your migration is probably locked due to a past failed process. Check the folder %s for a file called %s and remove this file to force the migration to run again."), "'application/cache/'", "'.migration_running'"); ?></p>
<p><?= sprintf(__("Current migration is %s"), $migration_version); ?><br>
<?= sprintf(__("Migration should be %s"), $migration_config); ?></p>
</div>
<table>
</table>
<div class="alert alert-danger mt-3 mb-3">
<h5><?= __("Migration is outdated and locked!"); ?></h5>
<p><?= sprintf(__("The current migration is not the version it is supposed to be. Reload this page after %s seconds. If this warning persists, your migration is likely locked due to a previously failed process. Delete the file %s to force the migration to run again."), $miglock_lifetime, $migration_lockfile); ?></p>
<p><?= sprintf(__("Check this wiki article <u><a href='%s' target='_blank'>here</a></u> for more information."), "https://github.com/wavelog/wavelog/wiki/Migration-is-locked"); ?></p>
<p><?= sprintf(__("Current migration is %s"), $migration_version); ?><br>
<?= sprintf(__("Migration should be %s"), $migration_config); ?></p>
</div>
<table>
<?php } ?>
<tr>
<td><?= __("Environment"); ?></td>