newsletter send status should be updated on cron after the send() function and the clear_spool() function
hanoii - September 23, 2009 - 17:57
| Project: | Simplenews |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
I noticed that I had an empty email accidentally stored in my subscription table which leaked to the spool table, and that message was never being removed from the spool (probably it would after expiring).
I removed it manually and noticed the newsletter status was not properly set to sent although the spool was empty. I checked the code, and the status was only being updated when there were actual messages to sent, but the clear spool function can also clear rows from that table, so I think it's better to have the update status be run on the _cron() hook after the other two.
Attached is a patch for that.
| Attachment | Size |
|---|---|
| simplenews_updatastatusoncron.patch | 796 bytes |
