Browse code

Fix notification reminder job

Benjamin Roth authored on08/09/2023 16:13:43
Showing1 changed files
... ...
@@ -59,12 +59,12 @@ class SecureDownloadsJob
59 59
             while ($Root->next())
60 60
             {
61 61
                 // Do we have new items
62
-                $Members = $this->db->executeQuery("SELECT s.pid FROM tl_member_secureDownloads s INNER JOIN tl_files f ON f.uuid = s.uuid WHERE s.nc_sent != '1' GROUP BY s.pid ORDER BY s.ctime DESC, f.name");
62
+                $Members = $this->db->executeQuery("SELECT s.pid FROM tl_member_secureDownloads s INNER JOIN tl_files f ON f.uuid = s.uuid WHERE s.nc_sent != '1' GROUP BY s.pid");
63 63
 
64 64
                 // Load groups and notification models if we have news to share
65 65
                 if ($Members->rowCount() && ($Notification = Notification::findByPk($Root->sd_nc_notification)) !== null)
66 66
                 {
67
-                    foreach ($Members as $member)
67
+                    foreach ($Members->iterateAssociative() as $member)
68 68
                     {
69 69
                         if (($Member = MemberModel::findOneBy(array("disable != '1'","login = '1'","email LIKE '%@%'","id = ?"),array($member['pid']))) !== null)
70 70
                         {