From 1fe966f5d87e9fed6699529693cd2357a828aced Mon Sep 17 00:00:00 2001 From: Remi Date: Wed, 2 Mar 2016 14:17:32 +0100 Subject: [PATCH] bug fixes: spf and dmarc record weren't updated for every domain due to loss in mysql result query buffer --- bureau/class/m_mail.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bureau/class/m_mail.php b/bureau/class/m_mail.php index 41c41f9b..35090f16 100644 --- a/bureau/class/m_mail.php +++ b/bureau/class/m_mail.php @@ -979,8 +979,9 @@ ORDER BY $new = trim($new); $old = trim($old); $db->query("SELECT domaine,login,compte FROM domaines, membres WHERE gesdns=1 AND gesmx=1 and membres.uid=domaines.compte;"); - while ($db->next_record()) { - $this->set_dns_spf($db->Record["domaine"], $new, $old, $db->Record["compte"], $db->Record["login"]); + while ($db->next_record()) $res[]=$db->Record; + foreach ($res as $record) { + $this->set_dns_spf($record["domaine"], $new, $old, $record["compte"], $record["login"]); } } @@ -988,8 +989,9 @@ ORDER BY $new = trim($new); $old = trim($old); $db->query("SELECT domaine,login,compte FROM domaines, membres WHERE gesdns=1 AND gesmx=1 and membres.uid=domaines.compte;"); - while ($db->next_record()) { - $this->set_dns_dmarc($db->Record["domaine"], $new, $old, $db->Record["compte"], $db->Record["login"]); + while ($db->next_record()) $res[]=$db->Record; + foreach ($res as $record) { + $this->set_dns_dmarc($record["domaine"], $new, $old, $record["compte"], $record["login"]); } } }