diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index c7b46ca4f03..643a1a67ea2 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -3411,7 +3411,7 @@ function monthArrayOrSelected($selected=0) * @param mesgstring Message * @param mesgarray Messages array * @param style Style of message output - * @return html Return html output + * @return string Return html output * @see dol_print_error */ function dol_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok') @@ -3424,25 +3424,25 @@ function dol_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok') if (is_array($mesgarray) && sizeof($mesgarray)) { $langs->load("errors"); - if (! $conf->global->MAIN_USE_JQUERY_JNOTIFY) $out.= '
'; + if (empty($conf->global->MAIN_USE_JQUERY_JNOTIFY)) $out.= '
'; foreach($mesgarray as $message) { $ret++; $out.= $langs->trans($message); if ($ret < sizeof($mesgarray)) $out.= "
\n"; } - if (! $conf->global->MAIN_USE_JQUERY_JNOTIFY) $out.= '
'; + if (empty($conf->global->MAIN_USE_JQUERY_JNOTIFY)) $out.= '
'; } if ($mesgstring) { $langs->load("errors"); $ret++; - if (! $conf->global->MAIN_USE_JQUERY_JNOTIFY) $out.= '
'; + if (empty($conf->global->MAIN_USE_JQUERY_JNOTIFY)) $out.= '
'; $out.= $langs->trans($mesgstring); - if (! $conf->global->MAIN_USE_JQUERY_JNOTIFY) $out.= '
'; + if (empty($conf->global->MAIN_USE_JQUERY_JNOTIFY)) $out.= '
'; } - if ($conf->global->MAIN_USE_JQUERY_JNOTIFY && ! empty($out)) - { + if (! empty($conf->global->MAIN_USE_JQUERY_JNOTIFY) && $out) + { print '