Posted by DragaO on October 7, 2011 at 10:28pm
1 follower
| Project: | Signup |
| Version: | 6.x-1.0 |
| Component: | CCK Date integration |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
I created a content type with a cck date field and enabled the functionality of repetition. When I created a node of this type, I put granularity as "day" and told to repeat the event for the next 5 days. When the cron ran, I received 5 emails warning. To fix this, I made a small change in file includes/cron.inc close to the line 57.
I've just modified it:
<?php
while ($signup = db_fetch_object($signups)) {
$user_mail = _signup_get_email($signup);
$params = array(
'subject' => $subject,
'body' => $node->reminder_email,
'node' => $node,
'signup' => $signup,
);
?>for this:
<?php
while ($signup = db_fetch_object($signups)) {
$user_mail = _signup_get_email($signup);
// send only one email per user
if (in_array($user_mail, $nodes[$node->nid])) {
continue;
}
$nodes[$node->nid][] = $user_mail;
$params = array(
'subject' => $subject,
'body' => $node->reminder_email,
'node' => $node,
'signup' => $signup,
);
?>Hope that helps on something.