I've yet to find out why.
Periodic notifications don't seem to work
« on June 16th, 2013, 02:40 AM »
Index: Sources/Notifications.php
===================================================================
--- Sources/Notifications.php (revision 2166)
+++ Sources/Notifications.php (working copy)
@@ -670,7 +765,7 @@
continue;
// Assemble the notifications into one huge text.
- $body = template_notification_email($m['notifications']);
+ $body = template_notification_email($m['notifications'], $m['id']);
$subject = sprintf($txt['notification_email_periodical_subject'], $m['name'], $m['unread']);
sendmail($m['email'], $subject, $body, null, null, true);
Index: Themes/default/Notifications.template.php
===================================================================
--- Themes/default/Notifications.template.php (revision 2166)
+++ Themes/default/Notifications.template.php (working copy)
@@ -64,46 +64,14 @@
}
-function template_notification_email($notifications)
+function template_notification_email($notifications, $member_id)
{
global $txt;
@@ -111,7 +79,7 @@
foreach ($notifications as $notifier => $notifs)
{
- list ($title) = weNotif::getNotifiers($notifier)->getProfile();
+ list ($title) = weNotif::getNotifiers($notifier)->getProfile($member_id);
$str .= '
<h3>' . $title . '</h3>
![]() | The way it's meant to be |
Index: I:/repos/wedge/trunk/Themes/default/Notifications.template.php
===================================================================
--- I:/repos/wedge/trunk/Themes/default/Notifications.template.php (revision 2194)
+++ I:/repos/wedge/trunk/Themes/default/Notifications.template.php (working copy)
@@ -116,9 +116,10 @@
$str .= "\n" . $title . "\n" . str_repeat('=', strlen($title)) . "\n";
foreach ($notifs as $n)
- $str .= $n->getEmail();
-
- $str .= "\n\n";
+ {
+ list (, $n) = $n->getNotifier()->getEmail($n, array());
+ $str .= $n . "\n\n";
+ }
}
return $str;
Index: I:/repos/wedge/trunk/Sources/Notifications.php
===================================================================
--- I:/repos/wedge/trunk/Sources/Notifications.php (revision 2194)
+++ I:/repos/wedge/trunk/Sources/Notifications.php (working copy)
@@ -609,7 +608,7 @@
{
$status = isset($data['email_notifiers'][$notifier->getName()]) ? $data['email_notifiers'][$notifier->getName()] : 0;
if ($status < 2 && (empty($data['disabled_notifiers']) || !in_array($notifier, $data['disabled_notifiers'])))
- $valid_notifiers[$notifier->getName()] = $notifier;
+ $valid_notifiers[$notifier->getName()] = true;
}
if (empty($valid_notifiers))