diff options
-rw-r--r-- | inc/html.php | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/inc/html.php b/inc/html.php index 5f154e175..114bdad9d 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1007,17 +1007,18 @@ function html_conflict($text,$summary){ * @author Andreas Gohr <andi@splitbrain.org> */ function html_msgarea(){ - global $MSG; - - if(!isset($MSG)) return; - - $MSG = array_unique($MSG); // no double messages - - foreach($MSG as $msg){ - print '<div class="'.$msg['lvl'].'">'; - print $msg['msg']; - print '</div>'; - } + global $MSG; + if(!isset($MSG)) return; + + $shown = array(); + foreach($MSG as $msg){ + $hash = md5($msg['msg']); + if(isset($shown[$hash])) continue; // skip double messages + print '<div class="'.$msg['lvl'].'">'; + print $msg['msg']; + print '</div>'; + $shown[$hash] = 1; + } } /** |