From 506d50cb882f16038ceb20ee00b66baef9b8b6cb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 14 Jun 2008 10:39:00 +0000 Subject: [PATCH] Fix: No spaces if welcome message is empty. --- htdocs/index.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/htdocs/index.php b/htdocs/index.php index b4747ba6181..de68530dd26 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -45,11 +45,17 @@ llxHeader(); print_fiche_titre($langs->trans("HomeArea")); -if (defined("MAIN_MOTD") && strlen(trim(MAIN_MOTD))) +if (! empty($conf->global->MAIN_MOTD)) { - print '
'; - print nl2br(MAIN_MOTD); - print '

'; + $conf->global->MAIN_MOTD=eregi_replace('','',$conf->global->MAIN_MOTD); + if (! empty($conf->global->MAIN_MOTD)) + { + print "\n\n"; + print '
'; + print dol_htmlentitiesbr($conf->global->MAIN_MOTD); + print '

'; + print "\n\n"; + } } // Affiche warning répertoire install existe (si utilisateur admin)