Removed warning

This commit is contained in:
Laurent Destailleur
2011-03-18 23:56:54 +00:00
parent 2de4541256
commit e648040f64

View File

@@ -3411,7 +3411,7 @@ function monthArrayOrSelected($selected=0)
* @param mesgstring Message * @param mesgstring Message
* @param mesgarray Messages array * @param mesgarray Messages array
* @param style Style of message output * @param style Style of message output
* @return html Return html output * @return string Return html output
* @see dol_print_error * @see dol_print_error
*/ */
function dol_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok') 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)) if (is_array($mesgarray) && sizeof($mesgarray))
{ {
$langs->load("errors"); $langs->load("errors");
if (! $conf->global->MAIN_USE_JQUERY_JNOTIFY) $out.= '<div class="'.$style.'">'; if (empty($conf->global->MAIN_USE_JQUERY_JNOTIFY)) $out.= '<div class="'.$style.'">';
foreach($mesgarray as $message) foreach($mesgarray as $message)
{ {
$ret++; $ret++;
$out.= $langs->trans($message); $out.= $langs->trans($message);
if ($ret < sizeof($mesgarray)) $out.= "<br>\n"; if ($ret < sizeof($mesgarray)) $out.= "<br>\n";
} }
if (! $conf->global->MAIN_USE_JQUERY_JNOTIFY) $out.= '</div>'; if (empty($conf->global->MAIN_USE_JQUERY_JNOTIFY)) $out.= '</div>';
} }
if ($mesgstring) if ($mesgstring)
{ {
$langs->load("errors"); $langs->load("errors");
$ret++; $ret++;
if (! $conf->global->MAIN_USE_JQUERY_JNOTIFY) $out.= '<div class="'.$style.'">'; if (empty($conf->global->MAIN_USE_JQUERY_JNOTIFY)) $out.= '<div class="'.$style.'">';
$out.= $langs->trans($mesgstring); $out.= $langs->trans($mesgstring);
if (! $conf->global->MAIN_USE_JQUERY_JNOTIFY) $out.= '</div>'; if (empty($conf->global->MAIN_USE_JQUERY_JNOTIFY)) $out.= '</div>';
} }
if ($conf->global->MAIN_USE_JQUERY_JNOTIFY && ! empty($out)) if (! empty($conf->global->MAIN_USE_JQUERY_JNOTIFY) && $out)
{ {
print '<script type="text/javascript"> print '<script type="text/javascript">
jQuery(document).ready(function() { jQuery(document).ready(function() {
jQuery.jnotify("'.$out.'", "'.($style=="ok" ? 3000 : $style).'", '.($style=="ok" ? "false" : "true").'); jQuery.jnotify("'.$out.'", "'.($style=="ok" ? 3000 : $style).'", '.($style=="ok" ? "false" : "true").');