diff --git a/htdocs/index.php b/htdocs/index.php
index ae4086acd48..af3a81727bf 100644
--- a/htdocs/index.php
+++ b/htdocs/index.php
@@ -96,11 +96,11 @@ $resultboxes = FormOther::getBoxesArea($user, "0"); // Load $resultboxes (select
if (getDolGlobalString('MAIN_MOTD')) {
- $conf->global->MAIN_MOTD = preg_replace('/
/i', '
', getDolGlobalString('MAIN_MOTD'));
+ $motd = preg_replace('/
/i', '
', getDolGlobalString('MAIN_MOTD'));
$substitutionarray = getCommonSubstitutionArray($langs);
complete_substitutions_array($substitutionarray, $langs);
- $texttoshow = make_substitutions(getDolGlobalString('MAIN_MOTD'), $substitutionarray, $langs);
+ $texttoshow = make_substitutions($motd, $substitutionarray, $langs);
print "\n\n";
print '
| ';
@@ -122,6 +122,20 @@ if (getDolGlobalInt('INVOICE_USE_SITUATION') == 1) {
}
*/
+if (getDolGlobalString('MAIN_FORCE_UPGRADE_MESSAGE') || getDolGlobalString('MAIN_FORCE_UPGRADE_URL')) {
+ $langs->loadLangs(array("other"));
+ if (is_numeric(getDolGlobalString('MAIN_FORCE_UPGRADE_MESSAGE'))) {
+ $messagetoshow = $langs->trans("YourInstallIsOldThanksToUpgrade");
+ } else {
+ $messagetoshow = $langs->trans(getDolGlobalString('MAIN_FORCE_UPGRADE_MESSAGE', "YourInstallIsOldThanksToUpgrade"));
+ }
+ if (getDolGlobalString('MAIN_FORCE_UPGRADE_URL')) {
+ $messagetoshow .= ' '.getDolGlobalString('MAIN_FORCE_UPGRADE_URL').''; + } + print info_admin($messagetoshow, 0, 0, 'warning', 'clearboth'); +} + + /* * Show security warnings */ diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 023484d6125..9ff7f0fac11 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -431,3 +431,4 @@ ToggleMicrophone=Toggle Microphone TypeYourQuestion=Type your question... SendPrompt=Send ConfirmAiAction=Are you sure you want to %1$s using the %2$s tool? +YourInstallIsOldThanksToUpgrade=Your Dolibarr version seems to be an old version. Thanks to request an upgrade from your customer dashboard. |