Fixes "undefined index" notices in the xnetgrp mailer.
authorVincent Zanotti <vincent.zanotti@m4x.org>
Sun, 4 Jul 2010 18:48:08 +0000 (20:48 +0200)
committerVincent Zanotti <vincent.zanotti@m4x.org>
Sun, 4 Jul 2010 18:48:08 +0000 (20:48 +0200)
Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
modules/xnetgrp/mail.inc.php

index 891146a..a8518fb 100644 (file)
@@ -100,11 +100,11 @@ function send_xnet_mails($from, $sujet, $body, $wiki, $tos, $replyto = null, $up
         } else {
             $email = $user;
         }
-        if ($sent[$email]) {
-            continue;
+
+        if (!isset($sent[$email])) {
+            _send_xnet_mail($user, $body, $wiki, $mailer, $replyto);
+            $sent[$email] = true;
         }
-        _send_xnet_mail($user, $body, $wiki, $mailer, $replyto);
-        $sent[$email] = true;
     }
 }