From 4af9f0d4f708978fe51932a539a578960e4b5edc Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 13 Feb 2009 10:44:16 +0100 Subject: fixed uniqueness check in html_msg FS#1606 Ignore-this: 6a22dba02d89c9c9745c8b2bab0188ab darcs-hash:20090213094416-7ad00-e70fa1b82cb657539304c761075defb5b24aef8c.gz --- inc/html.php | 23 ++++++++++++----------- 1 file 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 */ function html_msgarea(){ - global $MSG; - - if(!isset($MSG)) return; - - $MSG = array_unique($MSG); // no double messages - - foreach($MSG as $msg){ - print '
'; - print $msg['msg']; - print '
'; - } + 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 '
'; + print $msg['msg']; + print '
'; + $shown[$hash] = 1; + } } /** -- cgit v1.2.3