#11924 Fix LTS warning

This commit is contained in:
miguel angel rasteu 2023-08-30 12:54:31 +02:00
parent 1a3900d1fc
commit 5131977e37
1 changed files with 18 additions and 2 deletions

View File

@ -54,6 +54,22 @@ global $config;
<?php
} else {
// Updates.
$settings = update_manager_get_config_values();
$umc = new \UpdateManager\Client($settings);
$updates = $umc->listUpdates();
$text_for_next_version = '';
$text_for_last_version = '';
if ($updates[0]['lts'] === true) {
$text_for_next_version = __("Attention. You are about to install an LTS version. LTS versions are the most stable and are released twice a year. Before installing this LTS version, please make sure you have an <a href='index.php?sec=gextensions&sec2=enterprise/godmode/manage_backups'>up-to-date backup</a>.");
} else {
$text_for_next_version = __("Attention. You are about to install an RRR version. This version may contain new features and changes, so its installation is not recommended if you are looking for maximum system stability. LTS versions are the most stable and are released twice a year. <br/> Before installing this RRR version, please make sure you have an <a href='index.php?sec=gextensions&sec2=enterprise/godmode/manage_backups'>up-to-date backup</a>.");
}
if ($updates[array_key_last($updates)]['lts'] === true) {
$text_for_last_version = __("Attention. You are about to install an LTS version. LTS versions are the most stable and are released twice a year. Before installing this LTS version, please make sure you have an <a href='index.php?sec=gextensions&sec2=enterprise/godmode/manage_backups'>up-to-date backup</a>.");
} else {
$text_for_last_version = __("Attention. You are about to install an RRR version. This version may contain new features and changes, so its installation is not recommended if you are looking for maximum system stability. LTS versions are the most stable and are released twice a year. <br/> Before installing this RRR version, please make sure you have an <a href='index.php?sec=gextensions&sec2=enterprise/godmode/manage_backups'>up-to-date backup</a>.");
}
?>
<div id="um-loading">
<p id="loading-msg"></p>
@ -123,7 +139,7 @@ global $config;
result.innerHTML = '';
umConfirm({
/*message: "<?php echo __('This action will upgrade this console to version '); ?> "+nextUpdateVersion+". <?php echo __('Are you sure?'); ?>",*/
message: "<p>Attention. You are about to install an RRR version. This version may contain new features and changes, so its installation is not recommended if you are looking for maximum system stability. LTS versions are the most stable and are released twice a year. \n Before installing this RRR version, please make sure you have an <a href='index.php?sec=gextensions&sec2=enterprise/godmode/manage_backups'>up-to-date backup</a></p>.",
message: "<?php echo '<p>'.$text_for_next_version.'</p>'; ?> ",
title: "<?php echo __('Update to'); ?> "+nextUpdateVersion,
onAccept: function() {
updateNext({
@ -165,7 +181,7 @@ global $config;
result.innerHTML = '';
umConfirm({
/*message: "<?php echo __('This action will upgrade this console to version '); ?> "+lastUpdateVersion+". <?php echo __('Are you sure?'); ?>",*/
message: "<p>Attention. You are about to install an RRR version. This version may contain new features and changes, so its installation is not recommended if you are looking for maximum system stability. LTS versions are the most stable and are released twice a year. \n Before installing this RRR version, please make sure you have an <a href='index.php?sec=gextensions&sec2=enterprise/godmode/manage_backups'>up-to-date backup</a></p>.",
message: "<?php echo '<p>'.$text_for_last_version.'</p>'; ?> ",
title: "<?php echo __('Update to'); ?> "+lastUpdateVersion,
onAccept: function() {
updateLatest({