diff --git a/htdocs/install/check.php b/htdocs/install/check.php
index a2d64df5019..769331efa97 100644
--- a/htdocs/install/check.php
+++ b/htdocs/install/check.php
@@ -331,39 +331,45 @@ else
print $langs->trans("InstallEasy")." ";
print $langs->trans("ChooseYourSetupMode");
+ print '
';
$foundrecommandedchoice=0;
-
- // Array of install choices
- print '
| '.$langs->trans("FreshInstall").''; - print ' | '; - print ''; - print $langs->trans("FreshInstallDesc"); + $choice = ' | ||
| '.$langs->trans("FreshInstall").''; + $choice .= ' | '; + $choice .= '';
+ $choice .= $langs->trans("FreshInstallDesc");
if (empty($dolibarr_main_db_host)) // This means install process was not run
{
- print ' '; + $choice .= ' '; //print $langs->trans("InstallChoiceRecommanded",DOL_VERSION,$conf->global->MAIN_VERSION_LAST_UPGRADE); - print ' '.$langs->trans("InstallChoiceSuggested").' '.$langs->trans("InstallChoiceSuggested").' ';
$foundrecommandedchoice=1; // To show only once
}
- print ' | ';
- print ''; + + $choice .= ' | '; + $choice .= ''; if ($allowinstall) { - print ''.$langs->trans("Start").''; + $choice .= ''.$langs->trans("Start").''; } else { - print $langs->trans("InstallNotAllowed"); + $choice .= $langs->trans("InstallNotAllowed"); } - print ' | '; - print '
| '.$langs->trans("Upgrade").' '.$newversionfrom.$newversionfrombis.' -> '.$newversionto.' | ';
- print '';
- print $langs->trans("UpgradeDesc");
- if ($ok)
- {
- if (count($dolibarrlastupgradeversionarray) >= 2) // If a database access is available and last upgrade version is known
- {
- // Now we check if this is the first qualified choice
- if ($allowupgrade && empty($foundrecommandedchoice) &&
- (versioncompare($dolibarrversiontoarray,$dolibarrlastupgradeversionarray) > 0 || versioncompare($dolibarrversiontoarray,$versionarray) < -2)
- )
- {
- print ' '; - //print $langs->trans("InstallChoiceRecommanded",DOL_VERSION,$conf->global->MAIN_VERSION_LAST_UPGRADE); - print ' '.$langs->trans("InstallChoiceSuggested").' ';
- if ($count < count($migarray)) // There is other choices after
- {
- print $langs->trans("MigrateIsDoneStepByStep",DOL_VERSION);
- }
- print ' ';
- $foundrecommandedchoice=1; // To show only once
- }
- }
- else {
- // We can not recommand a choice.
- // A version of install may be known, but we need last upgrade.
- }
- }
- print ' | ';
- print ''; + if ($ok) + { + if (count($dolibarrlastupgradeversionarray) >= 2) // If a database access is available and last upgrade version is known + { + // Now we check if this is the first qualified choice + if ($allowupgrade && empty($foundrecommandedchoice) && + (versioncompare($dolibarrversiontoarray,$dolibarrlastupgradeversionarray) > 0 || versioncompare($dolibarrversiontoarray,$versionarray) < -2) + ) + { + $foundrecommandedchoice=1; // To show only once + $recommended_choice = true; + } + } + else { + // We can not recommand a choice. + // A version of install may be known, but we need last upgrade. + } + } + + $choice .= ' | |
| '.$langs->trans("Upgrade").' '.$newversionfrom.$newversionfrombis.' -> '.$newversionto.' | ';
+ $choice .= '';
+ $choice .= $langs->trans("UpgradeDesc");
+
+ if ($recommended_choice) {
+ $choice .= ' '; + //print $langs->trans("InstallChoiceRecommanded",DOL_VERSION,$conf->global->MAIN_VERSION_LAST_UPGRADE); + $choice .= ' '.$langs->trans("InstallChoiceSuggested").' ';
+ if ($count < count($migarray)) // There is other choices after
+ {
+ print $langs->trans("MigrateIsDoneStepByStep",DOL_VERSION);
+ }
+ $choice .= ' | ';
+ $choice .= ''; if ($allowupgrade) { // If it's not last updagre script, action = upgrade_tmp, if last action = upgrade - print ''.$langs->trans("Start").''; + $choice .= ''.$langs->trans("Start").''; } else { - print $langs->trans("NotAvailable"); + $choice .= $langs->trans("NotAvailable"); } - print ' | '; - print '
'.$langs->trans('ShowNotAvailableOptions').'';
+ print '