summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2009-02-13 10:44:16 +0100
committerAndreas Gohr <andi@splitbrain.org>2009-02-13 10:44:16 +0100
commit4af9f0d4f708978fe51932a539a578960e4b5edc (patch)
tree4a10b5a5ce6b95c952f2d39c6dad4155a85883da /inc
parent9caa83bd5d315b2bd9250e90d63ee969176264bb (diff)
downloadrpg-4af9f0d4f708978fe51932a539a578960e4b5edc.tar.gz
rpg-4af9f0d4f708978fe51932a539a578960e4b5edc.tar.bz2
fixed uniqueness check in html_msg FS#1606
Ignore-this: 6a22dba02d89c9c9745c8b2bab0188ab darcs-hash:20090213094416-7ad00-e70fa1b82cb657539304c761075defb5b24aef8c.gz
Diffstat (limited to 'inc')
-rw-r--r--inc/html.php23
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;
+ }
}
/**