From f1c71b1e750c6b8952192899c76dfe9393a0309a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 23 Aug 2011 23:50:15 +0000 Subject: [PATCH] Fix: Message style was missing in some situation --- htdocs/lib/functions.lib.php | 7 ++++--- htdocs/societe/societe.php | 12 ++++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index f3928365a76..b578f95b790 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -28,7 +28,7 @@ * \file htdocs/lib/functions.lib.php * \brief A set of functions for Dolibarr * This file contains all frequently used functions. - * \version $Id: functions.lib.php,v 1.564 2011/08/22 22:04:21 eldy Exp $ + * \version $Id: functions.lib.php,v 1.565 2011/08/23 23:50:25 eldy Exp $ */ // For compatibility during upgrade @@ -3753,7 +3753,8 @@ function get_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok', $keepemb unset($_SESSION['mesgarray']); } - if (! empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY) && ! preg_match('/
/i',$out)) + // If inline message with no format, we add it. + if ((! empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY) || $keepembedded) && ! preg_match('/
/i',$out)) { $divstart='
'; $divend='
'; @@ -3839,7 +3840,7 @@ function get_htmloutput_errors($mesgstring='', $mesgarray='', $keepembedded=0) * @param mesgstring Message * @param mesgarray Messages array * @param style Which style to use ('ok', 'error') - * @param keepembedded Set to 1 in error message must be kept embedded into its html place (this disable jnotify) + * @param keepembedded Set to 1 if message must be kept embedded into its html place (this disable jnotify) * @see dol_print_error * @see dol_htmloutput_errors */ diff --git a/htdocs/societe/societe.php b/htdocs/societe/societe.php index 0a1ad2cdb81..1d56b0d92c5 100644 --- a/htdocs/societe/societe.php +++ b/htdocs/societe/societe.php @@ -21,7 +21,7 @@ * \file htdocs/societe/societe.php * \ingroup societe * \brief Page to show a third party - * \version $Id: societe.php,v 1.12 2011/07/31 23:22:56 eldy Exp $ + * \version $Id: societe.php,v 1.13 2011/08/23 23:50:15 eldy Exp $ */ require_once("../main.inc.php"); @@ -158,8 +158,6 @@ if ($socname) $search_nom=$socname; } -// Affiche la confirmation de suppression d'un tiers -if ($_GET['delsoc']) print '
'.$langs->trans("CompanyDeleted",$_GET['delsoc']).'

'; /* * Mode Liste @@ -281,6 +279,12 @@ if ($resql) print_barre_liste($title, $page, $_SERVER["PHP_SELF"],$params,$sortfield,$sortorder,'',$num,$nbtotalofrecords); + // Show delete result message + if (GETPOST('delsoc')) + { + dol_htmloutput_mesg($langs->trans("CompanyDeleted",GETPOST('delsoc')),'','ok'); + } + $langs->load("other"); $textprofid=array(); foreach(array(1,2,3,4) as $key) @@ -429,5 +433,5 @@ else $db->close(); -llxFooter('$Date: 2011/07/31 23:22:56 $ - $Revision: 1.12 $'); +llxFooter('$Date: 2011/08/23 23:50:15 $ - $Revision: 1.13 $'); ?>